diff --git a/cps/__init__.py b/cps/__init__.py index d557649c..a879da0a 100644 --- a/cps/__init__.py +++ b/cps/__init__.py @@ -102,7 +102,6 @@ def create_app(): web_server.init_app(app, config) calibre_db.setup_db(config, cli.settingspath) - calibre_db.start() babel.init_app(app) _BABEL_TRANSLATIONS.update(str(item) for item in babel.list_translations()) diff --git a/cps/db.py b/cps/db.py index 7aba9b78..9eb8985d 100644 --- a/cps/db.py +++ b/cps/db.py @@ -24,14 +24,12 @@ import re import ast import json from datetime import datetime -import threading from sqlalchemy import create_engine from sqlalchemy import Table, Column, ForeignKey, CheckConstraint from sqlalchemy import String, Integer, Boolean, TIMESTAMP, Float from sqlalchemy.orm import relationship, sessionmaker, scoped_session from sqlalchemy.ext.declarative import declarative_base -from sqlalchemy.exc import OperationalError from sqlalchemy.pool import StaticPool from flask_login import current_user from sqlalchemy.sql.expression import and_, true, false, text, func, or_ @@ -332,10 +330,9 @@ class Custom_Columns(Base): return display_dict -class CalibreDB(threading.Thread): +class CalibreDB(): def __init__(self): - threading.Thread.__init__(self) self.engine = None self.session = None self.log = None diff --git a/cps/server.py b/cps/server.py index 7c2d321d..d27fe239 100644 --- a/cps/server.py +++ b/cps/server.py @@ -200,9 +200,6 @@ class WebServer(object): def stop(self, restart=False): from . import updater_thread updater_thread.stop() - from . import calibre_db - calibre_db.stop() - log.info("webserver stop (restart=%s)", restart) self.restart = restart