API - fix dramatiq warning when launching workers w/ script entrypoint

This commit is contained in:
Sam 2022-02-13 14:29:08 +01:00
parent 9522679eb8
commit d1aa220e1d
2 changed files with 1 additions and 3 deletions

View File

@ -7,7 +7,6 @@ from typing import Dict, Optional
import click
import gunicorn.app.base
from flask import Flask
from flask_dramatiq import worker
from flask_migrate import upgrade
from fittrackee import create_app, db
@ -19,7 +18,6 @@ PORT = os.getenv('PORT', '5000')
WORKERS = os.getenv('APP_WORKERS', 1)
BASEDIR = os.path.abspath(os.path.dirname(__file__))
app = create_app()
dramatiq_worker = worker
class StandaloneApplication(gunicorn.app.base.BaseApplication):

View File

@ -64,7 +64,7 @@ Sphinx = "^4.4.0"
fittrackee = 'fittrackee.__main__:main'
fittrackee_set_admin = 'fittrackee.__main__:set_admin'
fittrackee_upgrade_db = 'fittrackee.__main__:upgrade_db'
fittrackee_worker = 'fittrackee.__main__:dramatiq_worker'
fittrackee_worker = 'flask_dramatiq:worker'
[tool.black]
line-length = 79