From 7b9dbc805c3725cb58dff84d4c39d07c749554a7 Mon Sep 17 00:00:00 2001 From: Lili Date: Mon, 7 Nov 2022 16:45:29 +0100 Subject: [PATCH] add new and moved CLI commands to init --- tlapbot/__init__.py | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/tlapbot/__init__.py b/tlapbot/__init__.py index 96b3b5f..9b75963 100644 --- a/tlapbot/__init__.py +++ b/tlapbot/__init__.py @@ -30,14 +30,12 @@ def create_app(test_config=None): app.register_blueprint(owncast_webhooks.bp) app.register_blueprint(owncast_redeem_dashboard.bp) - # add db initialization CLI command + # add db CLI commands from . import db db.init_app(app) - - # add clear queue CLI command - from . import owncast_helpers - app.cli.add_command(owncast_helpers.clear_queue_command) - + app.cli.add_command(db.clear_queue_command) + app.cli.add_command(db.refresh_counters_command) + # scheduler job for giving points to users def proxy_job(): with app.app_context():