Commit 3b8e5ddf authored by OzzieIsaacs's avatar OzzieIsaacs

Merge remote-tracking branch 'worker/db' into Develop

# Conflicts:
#	cps/tasks/convert.py
parents 4b68a6ff 0480edce
...@@ -83,6 +83,8 @@ log = logger.create() ...@@ -83,6 +83,8 @@ log = logger.create()
from . import services from . import services
db.CalibreDB.setup_db(config, cli.settingspath)
calibre_db = db.CalibreDB() calibre_db = db.CalibreDB()
def create_app(): def create_app():
...@@ -91,7 +93,7 @@ def create_app(): ...@@ -91,7 +93,7 @@ def create_app():
if sys.version_info < (3, 0): if sys.version_info < (3, 0):
app.static_folder = app.static_folder.decode('utf-8') app.static_folder = app.static_folder.decode('utf-8')
app.root_path = app.root_path.decode('utf-8') app.root_path = app.root_path.decode('utf-8')
app.instance_path = app.instance_path .decode('utf-8') app.instance_path = app.instance_path.decode('utf-8')
cache_buster.init_cache_busting(app) cache_buster.init_cache_busting(app)
...@@ -101,7 +103,6 @@ def create_app(): ...@@ -101,7 +103,6 @@ def create_app():
app.secret_key = os.getenv('SECRET_KEY', config_sql.get_flask_session_key(ub.session)) app.secret_key = os.getenv('SECRET_KEY', config_sql.get_flask_session_key(ub.session))
web_server.init_app(app, config) web_server.init_app(app, config)
calibre_db.setup_db(config, cli.settingspath)
babel.init_app(app) babel.init_app(app)
_BABEL_TRANSLATIONS.update(str(item) for item in babel.list_translations()) _BABEL_TRANSLATIONS.update(str(item) for item in babel.list_translations())
......
This diff is collapsed.
...@@ -70,7 +70,8 @@ class TaskConvert(CalibreTask): ...@@ -70,7 +70,8 @@ class TaskConvert(CalibreTask):
return self._handleError(str(e)) return self._handleError(str(e))
def _convert_ebook_format(self): def _convert_ebook_format(self):
local_session = db.Session() error_message = None
local_session = db.CalibreDB()
file_path = self.file_path file_path = self.file_path
book_id = self.bookid book_id = self.bookid
format_old_ext = u'.' + self.settings['old_book_format'].lower() format_old_ext = u'.' + self.settings['old_book_format'].lower()
......
This source diff could not be displayed because it is too large. You can view the blob instead.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment