spawn.runners¶
Runners for spawn tasks
A runner has a run method, which runs the work required for a task,
and a complete method, which returns True when the task has completed.
-
class
spawn.runners.ProcessRunner(id_, input_file_path, exe_path, run_name=None, output_dir=None, cwd=None)[source]¶ Runner that uses the native os process (provided by
subprocess) in order to run tasks-
complete()[source]¶ Determine if the run is complete.
- Returns
Trueif the run is complete;Falseotherwise.- Return type
-
error_logs()[source]¶ Error logs produced by the process, if any
- Returns
The output written to stderr, if any, otherwise
None- Return type
-
logs()[source]¶ Stdout logs produced by the process, if any
- Returns
The output written to stdout, if any, otherwise
None- Return type
-
property
output_file_base¶ The base path of the output file (without extension)
- Returns
The path to the output file, without extension.
- Return type
path-like
-
property
process_args¶ The arguments to be provided to the subprocess.
Can be overridden in derived classes.
- Returns
An array containing the process arguments
- Return type
-
run()[source]¶ Runs the process synchronously.
Runs the process synchronously and when complete writes the log files and a status file.
-
property
state_file¶ The path to the state file
- Returns
The path to the state file
- Return type
path-like
-