API Documentation
app.job
LocalJob
dataclass
Bases: Job
A light-weight local job dataclass.
LocalJobConfig
dataclass
Job configuration for running a service locally.
SlurmJob
dataclass
Bases: Job
A light-weight Slurm job dataclass.
cancel() -> None
Cancel a Slurm job by issuing the scancel
command on the remote host.
This method logs a warning if the update fails, but does not raise an exception.
fetch_node() -> Optional[str]
Attempt to update the job node from Slurm accounting and return the new node (or the current node if the update fails).
This method logs a warning if the update fails, but does not raise an exception.
fetch_port() -> Optional[int]
Attempt to update the job port and return the new port (or the current port if the update fails)
The job port is stored as a directory in the remote Blackfish home when a port is assigned to a service container.
This method logs a warning if the update fails, but does not raise an exception.
update(verbose: bool = False) -> Optional[str]
Attempt to update the job state from Slurm accounting and return the new state (or current state if the update fails).
If the job state switches from PENDING or MISSING to RUNNING, also update the job node and port.
This method logs a warning if the update fails, but does not raise an exception.
wait(period: int = 5) -> dict[str, bool]
Wait for the job to start, re-checking the job's status every period
seconds.
SlurmJobConfig
dataclass
Job configuration for running a service as a Slurm job.