kai3341 / celery-pool-asyncio

Celery pool to run coroutine tasks
https://pypi.org/project/celery-pool-asyncio/
Other
109 stars 12 forks source link

RuntimeError: await wasn't used with future #35

Open Egnod opened 2 years ago

Egnod commented 2 years ago

Description

I use this library and sometimes this error appears, I can't figure it out on my own (although I follow all the recommendations from the README). I would really like to solve this problem.

What I Did

Just run task with delay and ...

RuntimeError: await wasn't used with future File "celery_pool_asyncio/tracer.py", line 199, in trace_task R = retval = await coro_utils.send_exception( File "celery_pool_asyncio/coro_utils.py", line 19, in send_exception await coro.throw(exception)

Skorpyon commented 1 year ago

Try to use await:

await my_task.delay(arg1, arg2, kwarg1=blabla, kwarg2=blablabla)