Ping runners on job abort/error

This commit is contained in:
Chocobozzz 2023-08-28 16:58:21 +02:00
parent 6a85ec0480
commit fe1e3535fd
No known key found for this signature in database
GPG Key ID: 583A612D890159BE

View File

@ -213,6 +213,8 @@ export abstract class AbstractJobHandler <C, U extends RunnerJobUpdatePayload, S
runnerJob.resetToPending()
await saveInTransactionWithRetries(runnerJob)
PeerTubeSocket.Instance.sendAvailableJobsPingToRunners()
}
protected setAbortState (runnerJob: MRunnerJob) {
@ -259,6 +261,8 @@ export abstract class AbstractJobHandler <C, U extends RunnerJobUpdatePayload, S
await this.error({ runnerJob: child, message: 'Parent error', fromParent: true })
}
} else {
PeerTubeSocket.Instance.sendAvailableJobsPingToRunners()
}
}