libmuscle.manager.instantiator module
- class libmuscle.manager.instantiator.CancelAllRequest[source]
Bases:
InstantiatorRequestRequests stopping all running processes.
- class libmuscle.manager.instantiator.CrashedResult(exception: BaseException | None = None)[source]
Bases:
objectSignals that the instantiator process crashed.
- class libmuscle.manager.instantiator.InstantiationRequest(instance: Reference, program: Program, res_req: ResourceRequirements, resources: ResourceAssignment, instance_dir: Path, work_dir: Path, stdout_path: Path, stderr_path: Path)[source]
Bases:
InstantiatorRequestRequests instantiating a new process.
- instance
The name of the instance
- program
The program to start for it
- res_req
The resource requirements for this instance
- resources
The specific resources to start it on
- instance_dir
The main directory for this instance
- work_dir
The directory in which to start it
- stdout_path
Path of file to redirect stdout to
- stderr_path
Path of file to redirect stderr to
- class libmuscle.manager.instantiator.InstantiatorRequest[source]
Bases:
objectBase class for requests to an instantiator.
- class libmuscle.manager.instantiator.Process(instance: Reference, resources: ResourceAssignment)[source]
Bases:
objectRepresents a process.
- instance
Name of instance this is the process of
- resources
The resources allocated to this process
- status
Current status of the process
- exit_code
Exit code, if status is ERROR
- error_msg
Error message, if status is ERROR
- class libmuscle.manager.instantiator.ProcessStatus(*values)[source]
Bases:
EnumStatus of a process (instance).
- CANCELED = 4
- ERROR = 3
- RUNNING = 1
- STARTED = 0
- SUCCESS = 2
- class libmuscle.manager.instantiator.QueueingLogHandler(queue: Queue)[source]
Bases:
HandlerA logging Handler that enqueues records.
- class libmuscle.manager.instantiator.ShutdownRequest[source]
Bases:
InstantiatorRequestRequests shutting down the background process.
The process will stop once all running processes are done.
- libmuscle.manager.instantiator.create_instance_env(instance: Reference, base_env: BaseEnv, overlay: Dict[str, str]) Dict[str, str][source]
Creates an environment for an instance.
This takes the current (manager) environment variables and makes a copy, then adds or extends it according to the overlay given.
Keys from overlay that start with + will have the corresponding value appended to the matching (by key, without the +) value in env, otherwise the value in env gets overwritten.