Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow jobs to be defined as coroutines #39

Closed
wants to merge 1 commit into from
Closed

Conversation

RealOrangeOne
Copy link
Contributor

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" ™️.

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

Note that this doesn't use a shared event loop, it simply starts one at execution time
@j4mie
Copy link
Member

j4mie commented Jan 21, 2023

This PR is a bit stale and I think probably not needed - if you do need to run some async code in a job or hook, you can just handle the async-to-sync stuff yourself.

@j4mie j4mie closed this Jan 21, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants