Пытаюсь подключить celery к flask выдает ошибку
[2021-01-17 16:24:10,786: ERROR/MainProcess] consumer: Cannot connect to
amqp://guest:**@127.0.0.1:5672//: [WinError 10061] No connection could be made because the target machine actively refused it.
app.config['CELERY_BROKER_URL'] = 'amqp://localhost//'
app.config['CELERY_BACKEND'] = 'db+sqlite:///project.db'
celery = make_celery(app)
в настройках celery
from celery import Celery
def make_celery(app):
celery = Celery(app.import_name, backend=app.config['CELERY_BACKEND'],
broker=app.config['CELERY_BROKER_URL'])
celery.conf.update(app.config)
TaskBase = celery.Task
class ContextTask(TaskBase):
abstract = True
def __call__(self,*args,**kwargs):
with app.app_context():
return TaskBase.__call__(self,*args,*kwargs)
celery.Task = ContextTask
return celery