Cédric Krier pushed to branch branch/default at Tryton / Tryton
Commits: caf8cde3 by Dani Möller at 2024-02-04T20:32:09+01:00 Rewrite worker with concurrent.futures instead of multiprocessing Unlike multiprocessing pools, the concurrent library pools will raise an exception if child processes have died and can't accept further tasks. This should cause the main worker to stop instead of stalling in an inifinite wait. Introduce a dummy noop execution in the pool to probe if it is still operative to mitigate the volume of lost tasks if the next submited execution would raise a BrokenExecutor exception. This isn't 100% bulletproof because the pool might still break between the probe and a new task being pulled. The maxtasksperchild CLI option will only work for Python 3.11 onwards because former concurrent.futures pools do not support this option. Closes #11104 - - - - - 0604db7e by Dani Möller at 2024-02-04T19:45:59+01:00 Use processing pool and selector as context managers Delegate closing both resources to the with instruction. - - - - - 3 changed files: - trytond/CHANGELOG - trytond/bin/trytond-worker - trytond/trytond/worker.py View it on Heptapod: https://foss.heptapod.net/tryton/tryton/-/compare/aaf5678bc207843eb308ea688da92236ac9ef0cb...0604db7e9093301e4a6c99995568f6c318f854e6 -- View it on Heptapod: https://foss.heptapod.net/tryton/tryton/-/compare/aaf5678bc207843eb308ea688da92236ac9ef0cb...0604db7e9093301e4a6c99995568f6c318f854e6 You're receiving this email because of your account on foss.heptapod.net.
