From d1aa220e1df6c6b3f24cc39eeefa4db445935eb3 Mon Sep 17 00:00:00 2001 From: Sam Date: Sun, 13 Feb 2022 14:29:08 +0100 Subject: [PATCH] API - fix dramatiq warning when launching workers w/ script entrypoint --- fittrackee/__main__.py | 2 -- pyproject.toml | 2 +- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/fittrackee/__main__.py b/fittrackee/__main__.py index ba56e991..0bc38ed2 100644 --- a/fittrackee/__main__.py +++ b/fittrackee/__main__.py @@ -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): diff --git a/pyproject.toml b/pyproject.toml index 253113a9..c8617464 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -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