Open gameveloster opened 1 year ago
Procrastinate is async at core.
We know that there are issues in the way this is handled at the moment and I'm not a huge fan of the current state of the lib at the moment, but I haven't really set aside some time to rework that
If you're interested in taking a bit of time to explore a trasition to a proper dual sync/async compat, feel free to have a look, I suggest starting from my PR linked above.
Was this fixed by the work done on #753?
It's highly possible, but I don't know. Do you want to try and report?
I am using
procrastinate
in a synchronous way in my Flask server withFlask-SocketIO
.Even though
procrastinate.manager.JobManager.list_jobs
is a synchronous method, calling it like belowgives the error
From the traceback, it looks like there was an attempt to call the async method
JobManager.list_jobs_async
which likely involves an event loop? I am unsure why calling a sync method involve calling an async method? Seems like the async method should wrap the sync method and not the other way around.Note that the sync method
sometask.defer
managed to run successfully.Will appreciate some help to get the sync method
JobManager.list_jobs
working in my sync environment, thank you!