-
Notifications
You must be signed in to change notification settings - Fork 66
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Adicionar celery ao projeto #14
Comments
Tem sim e seria uma boa idéia adicionar o Celery e o flask-rq |
Eu consegui através do flask-celery-helper, vou fazer mais alguns testes se estiver legal abro uma PR |
@Mdslino conseguiu fazer funcionar? |
Olhando para Flask-Celery-Helper, está descontinuada. Atualizando soluçãoEncontrei essa resposta no StackOverflow que remove a necessidade do Flask-Celery-Helper, implementei desta forma. celery_extension.py from celery import Celery
celery = Celery() queue.py from celery_extension import celery
def init_app(app: Flask):
celery.config_from_object(app.config, namespace='CELERY') Chama o run_celery.py from app import create_app
from celery_extension import celery
app = create_app()
if __name__ == '__main__':
with app.app_context():
celery.start() settings.toml CELERY_BROKER_URL = "amqp://admin:admin@localhost:5672//"
CELERY_RESULT_BACKEND = "rpc://" Para subir a o celery python run_celery.py worker --loglevel=info |
Teria uma forma de adicionar o celery ao projeto e carregar dinamicamente assim como as outras extensões?
The text was updated successfully, but these errors were encountered: