Skip to content
module

xqute.defaults

Default settings and utilities for xqute

Attributes
  • DEFAULT_ERROR_STRATEGY (str) — The default strategy when there iserror happened
  • DEFAULT_JOB_CMD_WRAPPER_SHELL — The default shell for job wrapper
  • DEFAULT_NUM_RETRIES (int) — Default number of retries whenDEFAULT_ERROR_STRATEGY is retry
  • DEFAULT_SCHEDULER_FORKS (int) — Default number of job forks for scheduler
  • DEFAULT_WORKDIR_NAME — The default work directory name for jobs to save the metadata
Classes
Functions
class

xqute.defaults.JobErrorStrategy()

The strategy when error happen from jobs

Attributes
  • HALT — halt the whole program
  • IGNORE — ignore and run next jobs
  • RETRY — 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 retried
  • FAILED — When a job is failed
  • FINISHED — When a job is finished
  • INIT — When a job is initialized
  • KILLING — When a job is being killed
  • QUEUED — When a job is queued
  • RUNNING — When a job is running
  • SUBMITTED — When a job is submitted
Methods
  • get_name(*statuses) (Union) — Get the name of the status</>
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, timeout)

Get the job command wrapper initialization script

Parameters
  • local (bool) — Whether the job is running locally
  • timeout (int) — The timeout for the job command
Returns (str)

The job command wrapper initialization script