Commit graph libervia-backend/libervia/backend/tools/common/async_process.py
Author SHA1 Message Date
Goffi
bdca7d2354 tools (common/async_process): add a cleaning mecanism:
PID of commands run with `CommandProtocol` are now tracked in memory and stopped/killed on
exit. A `pid_file` argument can be use to track the file on disk, which is useful to
detect stalled processes after a crash/unclean ending of the backend.

Add helper methods to stop and kill those processes.
2026-09-23 18:19:03 +02:00
Goffi
82e2c6efac apply black to the whole codebase. 2026-03-09 09:22:04 +01:00
Goffi
c46f0716dc tools (common/async_process): Accept bytes as stdin 2026-02-18 17:44:26 +01:00
Goffi
17ae6ba241 tools (common/async_process): accept Path instances as command path. 2024-06-20 14:47:09 +02:00
Goffi
53fdaa9d09 Reformatted code base using black. 2024-06-19 18:44:57 +02:00
Goffi
4fb87fb4c1 tools (common/async_process): show command and arguments used in error message in case a failure. 2024-05-31 11:08:23 +02:00
Goffi
e14dd9da8b core: add new init_script_path option:
`init_script_path` option can be used in `[DEFAULTS]` to run a script at the end of
backend initialisation. A new `init_pre_script` method is used to wait for backend to
reach this stage (designed to be used mostly by CLI frontend), then the usual `ready_get`
method is finished once the script is finished.
2023-12-13 22:00:22 +01:00
Goffi
d2685ba11b refactoring: renamed sat package to libervia.backend 2023-06-02 11:49:51 +02:00
Renamed from sat/tools/common/async_process.py (Browse further)