Replies: 1 comment
-
|
hi @guy-dono - thanks for the suggestion! I think we've already implemented some of this functionality, and other parts we likely won't / can't do. here's some notes:
My opinion is that developers, regardless of the size of the codebase, should follow the advice of FastAPI:
Ultimately, it's up to the developer to ensure they're using async / await properly. And while I agree that some blocking is likely, there are other things, such as running separate workers for separate teams (akin to microservices) that can work as a codebase scales. I'm going to close this since I don't think there's more to do here, but hopefully that helps! |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Problem
The
execution_timeoutand cancellation features work well as long as a task yields back to the event loop. But if the event loop gets blocked - for example, by a bad condition in awhileloop - the timeout can’t be enforced. In that case the task hangs forever, and the worker stays stuck until it’s manually restarted. In larger codebases, especially with many contributors, this scenario is almost inevitable.Proposed solution
Support the following executor modes, and allow tasks to specify them, so developers can choose the right level of isolation:
Considerations
stderrfrom the subprocesses to the logger manually.Beta Was this translation helpful? Give feedback.
All reactions