Note

This page is a reference documentation. It only explains the class signature, and not how to use it. Please refer to the user guide for the big picture.

hopla.utils.DelayedJob

class hopla.utils.DelayedJob(delayed_submission, executor, job_id)[source]

Bases: ABC

Represents a job that have been queue for submission by an executor, but hasn’t yet been scheduled.

Parameters:
delayed_submission: DelayedSubmission

a delayed submission allowing to generate the command line to execute.

executor: Executor

base job executor.

job_id: str

the job identifier.

__init__(delayed_submission, executor, job_id)[source]
property done

Checks whether the job is finished properly.

property exitcode

Check if the code finished properly.

abstract generate_batch()[source]

Write the batch file.

abstract read_jobid(string)[source]

Return the started job ID.

property report

Generate a report for the submitted job.

start(dryrun=False)[source]

Start a job.

Parameters:
dryrun: bool, default False

if True, only print the submission command.

abstract property start_command

Return the start job command.

property status

Checks the job status.

stop()[source]

Stop a job.

abstract property stop_command

Return the stop job command.

sub_report()[source]

Overload this method to extend the final report.