Made long running tasks cancellable. Added cancel button to cancellable tasks in the task list. Added APP_MODE env variable for determining if the app is running in development, test, or production.
This commit is contained in:
@@ -443,11 +443,11 @@ class CalibreDB():
|
||||
"""
|
||||
self.session = None
|
||||
if self._init:
|
||||
self.initSession(expire_on_commit)
|
||||
self.init_session(expire_on_commit)
|
||||
|
||||
self.instances.add(self)
|
||||
|
||||
def initSession(self, expire_on_commit=True):
|
||||
def init_session(self, expire_on_commit=True):
|
||||
self.session = self.session_factory()
|
||||
self.session.expire_on_commit = expire_on_commit
|
||||
self.update_title_sort(self.config)
|
||||
@@ -593,7 +593,7 @@ class CalibreDB():
|
||||
autoflush=True,
|
||||
bind=cls.engine))
|
||||
for inst in cls.instances:
|
||||
inst.initSession()
|
||||
inst.init_session()
|
||||
|
||||
cls._init = True
|
||||
return True
|
||||
|
||||
Reference in New Issue
Block a user