jade.jobs.async_cli_command.AsyncCliCommand

class jade.jobs.async_cli_command.AsyncCliCommand(job, cmd, output, batch_id, is_manager_node, hpc_job_id)[source]

Bases: AsyncJobInterface

Defines a a CLI command that can be submitted asynchronously.

Methods

cancel()

Cancel the job.

get_blocking_jobs()

Return the job names blocking this job.

get_id()

Return the ID of the job.

is_complete()

Return True if the job is complete.

remove_blocking_job(name)

Remove the name from the job's blocking list.

run()

Run the job.

set_blocking_jobs(jobs)

Set the blocking jobs.

Attributes

cancel_on_blocking_job_failure

Cancel the job if a blocking job fails.

job

Get the job.

name

Return the job name.

return_code

Returns the return code of the job.

cancel()[source]

Cancel the job.

property cancel_on_blocking_job_failure

Cancel the job if a blocking job fails.

get_id()[source]

Return the ID of the job.

Return type:

int

set_blocking_jobs(jobs)[source]

Set the blocking jobs.

Parameters:

jobs (set) – names that are blocking

is_complete()[source]

Return True if the job is complete.

Note: this must be called until the job actually completes.

Return type:

bool

Raises:

ExecutionError – Raised if statuses cannot be retrieved.

property job

Get the job.

Parameters:

job (JobParametersInterface)

property name

Return the job name.

Return type:

str

get_blocking_jobs()[source]

Return the job names blocking this job.

Returns:

Empty set means that the job is not blocked.

Return type:

set

remove_blocking_job(name)[source]

Remove the name from the job’s blocking list.

Parameters:

name (str) – name of job that is now finished

property return_code

Returns the return code of the job.

Returns:

0 means success, otherwise failure

Return type:

int

run()[source]

Run the job. Writes results to file when complete.