RuntimeError: There is no current event loop in thread 'Thread-10 (_handle_event_internal)'. #788
Labels
Issue contains: Exploration & Design decisions 🧩
We don't know how this will be implemented yet
Issue contains: Some Python 🐍
This issue involves writing some Python code
Issue status: Blocked ⛔️
Issue cannot be processed for now
Issue type: Bug 🐞
Something isn't working
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!The text was updated successfully, but these errors were encountered: