This is an abstract class for compute core job maintainers, which are responsible for submitting jobs and monitoring them.

Hierarchy (view full)

Constructors

Properties

_lock: boolean = false

mutex *

connector: default

HPC connectors *

envParam: Record<string, string> = {}
envParamDefault: Record<string, string> = {}
envParamValidators: undefined | Record<string, ((_val) => boolean)> = undefined
events: event[] = []
hpc: undefined | hpcConfig = undefined
id: string
initRetry: number = 3

parameters *

isEnd: boolean = false
isInit: boolean = false

states *

isPaused: boolean = false
job: Job

config *

jobOnHpc: boolean = false
lifeCycleState: {
    createdAt: null | number;
    initCounter: number;
} = ...

Type declaration

  • createdAt: null | number
  • initCounter: number
logs: string[] = []

data *

maintainThresholdInHours: number = 100000
maintainerConfig: undefined | maintainerConfig = undefined
slurm: undefined | slurm = undefined
validator: typeof validator = validator

packages *

Methods

  • Update this.events with the new event, and this.isInit or this.isEnd as appropriate

    Parameters

    • type: string

      Type of event to be recorded

    • message: string

      Message associated with the event

    Returns void

  • Initialize job in the maintainer. If the job has been retried too many times, terminate and update events.

    Returns Promise<void>

    Async

  • Ensure that the job is still running, and if the runtime has exceeded the maintain threshold, terminate and update events.

    Returns Promise<void>

    Async

  • This function is called when the supervisor tries to cancel the current job/maintainer. TODO: make a corresponding supervisor-facing function to be nore inline with the other onX functions.

    Returns Promise<void>

    Async

  • This function is called when the maintainer is initialized--i.e., it begins work on maintaining the job. Called in the supervisor-facing init() function.

    Returns Promise<void>

    Async

  • This function is called when the supervisor-facing maintain() function is called to maintain (monitor the status of) the job.

    Returns Promise<void>

    Async

  • This function is called when the supervisor tries to pause the current job/maintainer. Not used.

    Returns Promise<void>

    Async

  • This function is called when the supervisor tries to resume the current job/maintainer after pause. Not used.

    Returns Promise<void>

    Async

Generated using TypeDoc