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_SUBMISSION_BATCH(int) — Default consumer workersDEFAULT_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,remove_jid_after_done)(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)
Attributes
FAILED— 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 queuedRETRYING— When a job is to be retriedRUNNING— 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, remove_jid_after_done)
Get the job command wrapper initialization script
Parameters
local(bool) — Whether the job is running locallyremove_jid_after_done(bool) — Whether to remove the remote job id fileafter the job is done
Returns (str)
The job command wrapper initialization script