Celery worker never ready (hangs) with flask -


i have tasks module in which, following:

def make_celery(app):     celery = celery(app.import_name, broker=app.config['celery_broker_url'])     celery.conf.update(app.config)     taskbase = celery.task     class contexttask(taskbase):           abstract = true               def __call__(self, *args, **kwargs):                    app.app_context():                       return taskbase.__call__(self, *args, **kwargs)     celery.task = contexttask     return celery  @celery.task(name="tasks.add") def add(x, y):     return x + y 

the celery app created so:

celery = tasks.make_celery(app) 

where app flask app

for configs using:

celery_broker_url = str(os.environ.get("celery_broker_url", 'redis://localhost:6379/0'))     celery_result_backend = str(os.environ.get("celery_result_backend", 'redis://localhost:6379/0')) 

i following tutorial in http://flask.pocoo.org/docs/patterns/celery/

however, when run worker, see starting, , lists add task hangs (never displays ready message).

i experiencing identical symptoms , able narrow problem down flask-socketio. while isn't directly what's causing op's problem, related or relevant future visitors identical symptoms.

i documented problem here: https://github.com/miguelgrinberg/flask-socketio/issues/61

also, not enough reputation post comment.


Comments

Popular posts from this blog

android - Get AccessToken using signpost OAuth without opening a browser (Two legged Oauth) -

org.mockito.exceptions.misusing.InvalidUseOfMatchersException: mockito -

google shop client API returns 400 bad request error while adding an item -