django-db-queue icon indicating copy to clipboard operation
django-db-queue copied to clipboard

Allow jobs to be defined as coroutines

Open RealOrangeOne opened this issue 4 years ago • 0 comments

For some libraries, it's necessary to use async code, even if it's in a single process where the async benefits don't apply.

This transparently calls a job function as a coroutine if it is one, allow jobs defined async def my_job(job): to "just work" :tm:.

Note that this doesn't use a shared event loop, it simply starts one at execution time.

RealOrangeOne avatar Oct 05 '20 11:10 RealOrangeOne