if __name__ == '__main__':
logger.debug('running with this enviroment: %s', os.environ)
atexit.register(remove_git_target_workspace)
- kernel_revision_obj = get_last_kernel_revision_obj()
+ kernel_revision_obj = kernel_persistence.get_last_kernel_revision_obj()
new_version = kernel_revision_obj.last_version + 1
- if not update_kernel_revision_obj(kernel_revision_obj, new_version):
+ if not kernel_persistance.update_kernel_revision_obj(kernel_revision_obj, new_version):
logger.info(
'Could not update persistence version to %s for %s'
%(new_version, GIT_BRANCH_NAME)
PERSISTENCE_FILE = os.path.join(CWD, '..', '.persistence')
Base = declarative_base()
-
engine = create_engine('sqlite:///%s' %(PERSISTENCE_FILE))
Session = sessionmaker(bind=engine)
+Base.metadata.create_all(engine)
class KernelVersion(Base):
__tablename__ = 'branch_kernel_version'
self.identifier, self.last_version
)
-Base.metadata.create_all(engine)
-
def get_last_kernel_revision_obj():
session = Session()
logger.debug('Getting kernel revision from persistence')
return True
finally:
session.close()
-
-