xqute.defaults
Default settings and utilities for xqute
Attributes
DEFAULT_ERROR_STRATEGY(str) — The default strategy when there iserror happenedDEFAULT_JOB_CMD_WRAPPER_SHELL— The default shell for job wrapperDEFAULT_NUM_RETRIES(int) — Default number of retries whenDEFAULT_ERROR_STRATEGY is retryDEFAULT_SCHEDULER_FORKS(int) — Default number of job forks for schedulerDEFAULT_WORKDIR— The default work directory for jobs to save the metadata
Classes
JobErrorStrategy— The strategy when error happen from jobs</>JobStatus— The status of a job</>
Functions
get_jobcmd_wrapper_init(local)(str) — Get the job command wrapper initialization script</>
class
xqute.defaults.JobErrorStrategy()
The strategy when error happen from jobs
Attributes
HALT— halt the whole programIGNORE— ignore and run next jobsRETRY— retry the job
class
xqute.defaults.JobStatus()
The status of a job
Life cycles: ........................queued in scheduler INIT -> QUEUED -> SUBMITTED -> RUNNING -> FINISHED (FAILED) INIT -> QUEUED -> SUBMITTED -> RUNNING -> KILLING -> FINISHED INIT -> QUEUED -> SUBMITTED -> KILLING -> FINISHED INIT -> QUEUED -> (CANCELLED)
Note that RUNNING, FINISHED and FAILED are the statuses that are polled from the scheduler. They can not be set directly by xqute; they are set in the job wrapper script.
Attributes
# RETRYING— When a job is to be retriedFAILED— When a job is failedFINISHED— When a job is finishedINIT— When a job is initializedKILLING— When a job is being killedQUEUED— When a job is queuedRUNNING— When a job is runningSUBMITTED— When a job is submitted
classmethod
get_name(*statuses)
Get the name of the status
Parameters
*statuses(int) — The status values
Returns (Union)
The name of the status if a single status is passed, otherwisea tuple of names
function
xqute.defaults.get_jobcmd_wrapper_init(local)
Get the job command wrapper initialization script
Parameters
local(bool) — Whether the job is running locally
Returns (str)
The job command wrapper initialization script