celery-aio-pool icon indicating copy to clipboard operation
celery-aio-pool copied to clipboard

How send tasks in async

Open Skorpyon opened this issue 1 year ago • 5 comments

Hello!

Pool works perfect.

But I some stuck with solution how to send tasks.

Right now I just sending it in sync manner:

celery_app.send_task("sso.tasks.parse_whitelist", kwargs={"company_id": company.id}

Any sync/async regular ways doesn't works:

# doesn't work
parse_whitelist.apply_async(company_id=company.id)
# I understand that it shouldn't work, but I still tried )))
await parse_whitelist.apply_async(company_id=company.id)

May you advice please?

PS. I've using [email protected]

Skorpyon avatar Apr 13 '23 20:04 Skorpyon