spmi.core.manageables.task_.backends package#
Submodules#
spmi.core.manageables.task_.backends.screen module#
Provides ScreenBackend
.
- class spmi.core.manageables.task_.backends.screen.ScreenBackend#
Bases:
Backend
GNU Screen backend.
- is_active(task_metadata)#
Returns
True
, if job is active.- Parameters:
task_metadata (
TaskManageable.MetaDataHelper
) – Metadata.- Returns:
bool
.- Raises:
TypeError –
- kill(task_metadata)#
Kills wrapper process.
- Parameters:
task_metadata (
TaskManageable.MetaDataHelper
) – Metadata.- Raises:
TypeError –
- load_screens()#
Loads all screen sessions.
- submit(task_metadata)#
Submits command.
- Parameters:
task_metadata (
TaskManageable.MetaDataHelper
) – Metadata.- Returns:
str
. ID of submitted task.- Raises:
TypeError –
- term(task_metadata)#
Terminates wrapper process.
- Parameters:
task_metadata (
TaskManageable.MetaDataHelper
) – Metadata.- Raises:
TypeError –
- exception spmi.core.manageables.task_.backends.screen.ScreenBackendException#
Bases:
BackendException
spmi.core.manageables.task_.backends.slurm module#
Provides SlurmBackend
.
- class spmi.core.manageables.task_.backends.slurm.SlurmBackend#
Bases:
Backend
- class MetaDataHelper(meta=None, data=None, metadata=None, mutable=True, copy=False)#
Bases:
MetaDataHelper
- Parameters:
meta (
Union[dict, None]
) – Meta dictionary. Empty ifNone
.data (
Union[dict, None]
) – Data dictionary. Empty ifNone
.metadata (
Union[dict, MetaDataNode]
) –MetaDataNode
object.mutable (
bool
) – Mutable flag.copy (
bool
) – Copy flag. IfTrue
, deepcopiesmeta
,data
andmetadata
.
Note
You can set meta and data or metadata flags at once
- Raises:
TypeError –
ValueError –
- property options#
- is_active(task_metadata)#
Returns
True
, if job is active.- Parameters:
task_metadata (
TaskManageable.MetaDataHelper
) – Metadata.- Returns:
bool
.- Raises:
TypeError –
- kill(task_metadata)#
Kills wrapper process.
- Parameters:
task_metadata (
TaskManageable.MetaDataHelper
) – Metadata.- Raises:
TypeError –
- load_jobs()#
Loads all job IDs.
- submit(task_metadata)#
Submits command.
- Parameters:
task_metadata (
TaskManageable.MetaDataHelper
) – Metadata.- Returns:
str
. ID of submitted task.- Raises:
TypeError –
- term(task_metadata)#
Terminates wrapper process.
- Parameters:
task_metadata (
TaskManageable.MetaDataHelper
) – Metadata.- Raises:
TypeError –
- exception spmi.core.manageables.task_.backends.slurm.SlurmBackendException#
Bases:
BackendException