depot/pkgs/by-name/ca/calibre-web/db-migrations.patch
Luke Granger-Brown 57725ef3ec Squashed 'third_party/nixpkgs/' content from commit 76612b17c0ce
git-subtree-dir: third_party/nixpkgs
git-subtree-split: 76612b17c0ce71689921ca12d9ffdc9c23ce40b2
2024-11-10 23:59:47 +00:00

14 lines
477 B
Diff

diff --git a/cps/__init__.py b/cps/__init__.py
index 1ba1f778..fd5dc2f1 100644
--- a/cps/__init__.py
+++ b/cps/__init__.py
@@ -116,6 +116,9 @@ def create_app():
db.CalibreDB.setup_db(config.config_calibre_dir, cli_param.settings_path)
calibre_db.init_db()
+ if os.environ.get('__RUN_MIGRATIONS_AND_EXIT'):
+ sys.exit(0)
+
updater_thread.init_updater(config, web_server)
# Perform dry run of updater and exit afterwards
if cli_param.dry_run: