Script
Module for interfaces that support various schedulers.
CancellationRecord
Bases: Record
A container for data returned from a scheduler cancellation call.
Source code in maestrowf/interfaces/script/__init__.py
cancel_status
property
Get the high level CancelCode status.
return_code
property
Get the return code from the cancel command.
__init__(cancel_status, retcode)
Initialize an empty CancellationRecord.
Source code in maestrowf/interfaces/script/__init__.py
add_status(jobid, cancel_status)
Add the cancellation status for a single job to a record.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
jobid |
Unique job identifier for the job status to be added. |
required | |
cancel_status |
CancelCode designating how cancellation terminated. |
required |
Source code in maestrowf/interfaces/script/__init__.py
lookup_status(cancel_status)
Find the cancellation status of the job identified by jid.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
cancel_status |
The CancelCode to look up. |
required |
Returns:
Type | Description |
---|---|
Set of job identifiers that match the requested status. |
Source code in maestrowf/interfaces/script/__init__.py
FluxFactory
Bases: object
A factory for swapping out Flux's backend interface based on version.
Source code in maestrowf/interfaces/script/__init__.py
SubmissionRecord
Bases: Record
A container for data about return state upon scheduler submission.
Source code in maestrowf/interfaces/script/__init__.py
job_identifier
property
Property for the job identifier for the record.
Returns:
Type | Description |
---|---|
A string representing the job identifier assigned by the scheduler. |
return_code
property
Property for the raw return code returned from submission.
Returns:
Type | Description |
---|---|
An integer representing the state of the raw return code from submission. |
submission_code
property
Property for submission state for the record.
Returns:
Type | Description |
---|---|
A SubmissionCode enum representing the state of the submission call. |
__init__(subcode, retcode, jobid=-1)
Initialize a new SubmissionRecord.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
jobid |
The assigned job identifier for this record. |
-1
|
|
retcode |
The submission code returned by the scheduler submit. |
required |
Source code in maestrowf/interfaces/script/__init__.py
add_info(key, value)
Set additional informational key-value information.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
key |
Record key identifying data. |
required | |
value |
Data to be recorded. |
required |