jade.utils.subprocess_manager.SubprocessManager¶
- class jade.utils.subprocess_manager.SubprocessManager[source]¶
Bases:
object
Allows non-blocking execution of a command in a subprocess.
Methods
Returns True if commands are still running.
run
(command[, timeout])Run a command without blocking.
Terminates the command.
Waits until the command is complete.
Attributes
Return the return coe of the last completed command.
- property return_code¶
Return the return coe of the last completed command.
- Returns:
Returns None if the command did not complete.
- Return type:
int | None
- run(command, timeout=None)[source]¶
Run a command without blocking. Call wait_for_completion() or in_progress() to monitor progress.
- Parameters:
command (str) – Command to execute
timeout (int or None) – Timeout in seconds for each command. None means no timeout.
- Raises:
JobAlreadyInProgress – Raised if execution is already in progress.