Avoid blocking lava worker event loop with long blocking functions
Use ThreadExecutor to run long blocking functions like requests_post
or shutil.rmtree
.
This also enables future optimizations such as cleaning up Job's directories outside the main loop. See !2468 (merged)