jobflow_remote.jobs.batch module#

class jobflow_remote.jobs.batch.LocalBatchManager(files_dir: str | Path, process_id: str)[source]#

Bases: object

Manager of local files containing information about Jobs to be handled by a batch worker.

Used in the worker to executes the batch Jobs.

get_job() str | None[source]#
terminate_job(job_id: str, index: int) None[source]#
class jobflow_remote.jobs.batch.RemoteBatchManager(host: BaseHost, files_dir: str | Path)[source]#

Bases: object

Manager of remote files containing information about Jobs to be handled by a batch worker.

Used by the Runner.

Parameters:
  • host – The host where the files are.

  • files_dir – The full path to directory where the files are stored.

delete_terminated(ids: list[tuple[str, int, str]]) None[source]#
get_running() list[tuple[str, int, str]][source]#
get_submitted() list[str][source]#

Get a list of files present in the submitted directory.

Return type:

The list of file names in the directory.

get_terminated() list[tuple[str, int, str]][source]#

Get job ids and process ids of the terminated jobs from the corresponding directory.

submit_job(job_id: str, index: int) None[source]#

Submit a Job by uploading the corresponding file.

Parameters:
  • job_id – Uuid of the Job.

  • index – Index of the Job.