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:
kill(task_metadata)#

Kills wrapper process.

Parameters:

task_metadata (TaskManageable.MetaDataHelper) – Metadata.

Raises:
load_screens()#

Loads all screen sessions.

submit(task_metadata)#

Submits command.

Parameters:

task_metadata (TaskManageable.MetaDataHelper) – Metadata.

Returns:

str. ID of submitted task.

Raises:
term(task_metadata)#

Terminates wrapper process.

Parameters:

task_metadata (TaskManageable.MetaDataHelper) – Metadata.

Raises:
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 if None.

  • data (Union[dict, None]) – Data dictionary. Empty if None.

  • metadata (Union[dict, MetaDataNode]) – MetaDataNode object.

  • mutable (bool) – Mutable flag.

  • copy (bool) – Copy flag. If True, deepcopies meta, data and metadata.

Note

You can set meta and data or metadata flags at once

Raises:
property options#
is_active(task_metadata)#

Returns True, if job is active.

Parameters:

task_metadata (TaskManageable.MetaDataHelper) – Metadata.

Returns:

bool.

Raises:
kill(task_metadata)#

Kills wrapper process.

Parameters:

task_metadata (TaskManageable.MetaDataHelper) – Metadata.

Raises:
load_jobs()#

Loads all job IDs.

submit(task_metadata)#

Submits command.

Parameters:

task_metadata (TaskManageable.MetaDataHelper) – Metadata.

Returns:

str. ID of submitted task.

Raises:
term(task_metadata)#

Terminates wrapper process.

Parameters:

task_metadata (TaskManageable.MetaDataHelper) – Metadata.

Raises:
exception spmi.core.manageables.task_.backends.slurm.SlurmBackendException#

Bases: BackendException

Module contents#