API - fix dramatiq warning when launching workers w/ script entrypoint
This commit is contained in:
parent
9522679eb8
commit
d1aa220e1d
@ -7,7 +7,6 @@ from typing import Dict, Optional
|
|||||||
import click
|
import click
|
||||||
import gunicorn.app.base
|
import gunicorn.app.base
|
||||||
from flask import Flask
|
from flask import Flask
|
||||||
from flask_dramatiq import worker
|
|
||||||
from flask_migrate import upgrade
|
from flask_migrate import upgrade
|
||||||
|
|
||||||
from fittrackee import create_app, db
|
from fittrackee import create_app, db
|
||||||
@ -19,7 +18,6 @@ PORT = os.getenv('PORT', '5000')
|
|||||||
WORKERS = os.getenv('APP_WORKERS', 1)
|
WORKERS = os.getenv('APP_WORKERS', 1)
|
||||||
BASEDIR = os.path.abspath(os.path.dirname(__file__))
|
BASEDIR = os.path.abspath(os.path.dirname(__file__))
|
||||||
app = create_app()
|
app = create_app()
|
||||||
dramatiq_worker = worker
|
|
||||||
|
|
||||||
|
|
||||||
class StandaloneApplication(gunicorn.app.base.BaseApplication):
|
class StandaloneApplication(gunicorn.app.base.BaseApplication):
|
||||||
|
@ -64,7 +64,7 @@ Sphinx = "^4.4.0"
|
|||||||
fittrackee = 'fittrackee.__main__:main'
|
fittrackee = 'fittrackee.__main__:main'
|
||||||
fittrackee_set_admin = 'fittrackee.__main__:set_admin'
|
fittrackee_set_admin = 'fittrackee.__main__:set_admin'
|
||||||
fittrackee_upgrade_db = 'fittrackee.__main__:upgrade_db'
|
fittrackee_upgrade_db = 'fittrackee.__main__:upgrade_db'
|
||||||
fittrackee_worker = 'fittrackee.__main__:dramatiq_worker'
|
fittrackee_worker = 'flask_dramatiq:worker'
|
||||||
|
|
||||||
[tool.black]
|
[tool.black]
|
||||||
line-length = 79
|
line-length = 79
|
||||||
|
Loading…
Reference in New Issue
Block a user