Skip to content

Submitting celery tasks from asyncio #6483

@mbirtwell

Description

@mbirtwell

I posted on the Celery mailing list:

I've seen some suggestions that asyncio support was hoped for Celery 5.0, but it doesn't seem to have happened. Does anyone know if this is being actively worked on?

I'm particularly interested in submitting tasks and waiting for results from an asyncio context as opposed to writing asyncio code in a celery worker. Having had a bit of a poke around it seems like writing a separate celery client just to cover the most obvious use-cases in this area would be quite doable. But I wanted to check this wasn't coming to main celery soon or if anyone knew of anything similar.

And it was suggested that I create an issue here to get some feedback on my approach. In brief I'm writing a separate client that speaks the celery protocol for submitting tasks. Where possible I'm making use of existing celery functions, which don't do any networking to help with that and re-implementing anything that talks to the network using aioamqp and aioredis.

I've got some code, which is only really demoware at the moment: https://github.com/mbirtwell/asyncio_celery_client

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions