API - disable worker entry point

This commit is contained in:
Sam
2022-11-27 08:40:45 +01:00
parent 827867e822
commit 9df851bc28
3 changed files with 10 additions and 2 deletions

View File

@ -81,6 +81,14 @@ def upgrade_db() -> None:
upgrade(directory=BASEDIR + '/migrations')
def worker() -> None:
raise SystemExit(
"Error: this command is disabled, "
"it will be removed in a next version.\n"
"Please use flask-dramatiq CLI instead ('flask worker')."
)
def main() -> None:
options = {'bind': f'{HOST}:{PORT}', 'workers': WORKERS}
StandaloneApplication(app, options).run()