opened
alexwwang
username_0
Hi Miguel,

I tried your method to embed celery into a flask app with blueprint. But each time I shoot a task to celery, I got a "PENDING" status and through flower I get to know the task were not received by celery workers at all.

I utilize the `apply_async` method to submit the celery task in my api definitions. 
I use flask, flask-restful to build my api and try to use celery to do some async tasks as follow.
It looks like:
```
from app import celery

@celery.task(bind=True, task_time_limit=60, task_soft_time_limit=15, \
    acks_late=True, autoretry_for=(TimeLimitExceeded, ), retry_kwargs=( \
    'max_retries':10, 'retry_backoff': True}, queue='fast_queue', \
    name='proj.app.api.async_func')
def async_func(self, arg1, arg2, arg3):
    ...

@celery.task(bind=True, task_time_limit=60, task_soft_time_limit=15, \
    acks_late=True, autoretry_for=(TimeLimitExceeded, ), retry_kwargs=( \
    'max_retries':10, 'retry_backoff': True}, queue='fast_queue', \
    name='proj.app.api.async_callback')
def async_callback(self, arg):
    ...

# in api definition file
from *** import async_func, async_callback
...

    task = async_func.apply_async(args=([arg1, arg2, arg3]), link=async_callback.s())
...

```

I can't figure out where I am wrong so would you please give me some hints?

Before this, I have done some test on celery and could make it run according to the snippet in flask official site. But when I move the settings here to my project, it always fails.

Thanks in advance.
Tasks cannot really pass to celery queues
issue
created
alexwwang
username_0
Sorry to bother. 

It's my fault mistakenly set two sets of different queue names for workers and in the task functions.
By making them coherent, the worker daemon received those tasks.
comment
closed
alexwwang
username_0
issue