Initialize job in the maintainer. If the job has been retried too many times, terminate and update events.
Returns Promise<void>
Async
maintain
maintain(): Promise<void>
Ensure that the job is still running, and if the runtime has exceeded the maintain threshold, terminate and update events.
Returns Promise<void>
Async
AbstractonCancel
onCancel(): Promise<void>
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
AbstractonDefine
onDefine(): void
This function is called when the maintainer is created (during the constructor). Can leave empty.
Returns void
AbstractonInit
onInit(): Promise<void>
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
AbstractonMaintain
onMaintain(): Promise<void>
This function is called when the supervisor-facing maintain() function is called to maintain (monitor the status of) the job.
Returns Promise<void>
Async
AbstractonPause
onPause(): Promise<void>
This function is called when the supervisor tries to pause the current job/maintainer. Not used.
Returns Promise<void>
Async
AbstractonResume
onResume(): Promise<void>
This function is called when the supervisor tries to resume the current job/maintainer after pause. Not used.
Returns Promise<void>
Async
updateJob
updateJob(job): Promise<void>
Update this job to reflect the information in the passed job.
This is an abstract class for compute core job maintainers, which are responsible for submitting jobs and monitoring them.