mirror of
https://github.com/Chocobozzz/PeerTube.git
synced 2024-11-22 08:46:54 -06:00
Fix cancel on stall error message
This commit is contained in:
parent
0301d77254
commit
0e718cb7b2
@ -199,11 +199,12 @@ export abstract class AbstractJobHandler <C, U extends RunnerJobUpdatePayload, S
|
||||
|
||||
async abort (options: {
|
||||
runnerJob: MRunnerJob
|
||||
abortNotSupportedErrorMessage?: string
|
||||
}) {
|
||||
const { runnerJob } = options
|
||||
const { runnerJob, abortNotSupportedErrorMessage = 'Job has been aborted but it is not supported by this job type' } = options
|
||||
|
||||
if (this.isAbortSupported() !== true) {
|
||||
return this.error({ runnerJob, message: 'Job has been aborted but it is not supported by this job type' })
|
||||
return this.error({ runnerJob, message: abortNotSupportedErrorMessage })
|
||||
}
|
||||
|
||||
await this.specificAbort(options)
|
||||
|
@ -32,7 +32,11 @@ export class RunnerJobWatchDogScheduler extends AbstractScheduler {
|
||||
logger.info('Abort stalled runner job %s (%s)', stalled.uuid, stalled.type, lTags(stalled.uuid, stalled.type))
|
||||
|
||||
const Handler = getRunnerJobHandlerClass(stalled)
|
||||
await new Handler().abort({ runnerJob: stalled })
|
||||
|
||||
await new Handler().abort({
|
||||
runnerJob: stalled,
|
||||
abortNotSupportedErrorMessage: 'Stalled runner job'
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user