aboutsummaryrefslogtreecommitdiffhomepage
path: root/server
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2023-08-28 16:58:21 +0200
committerChocobozzz <me@florianbigard.com>2023-08-28 16:59:45 +0200
commitfe1e3535fdd6edf5be0ac9ecb2ea80fb877751b3 (patch)
tree1b1d777be5f5a664728ac0cdac1873dc7a604b67 /server
parent6a85ec04806aa11ad242e09a4a810e2451200932 (diff)
downloadPeerTube-fe1e3535fdd6edf5be0ac9ecb2ea80fb877751b3.tar.gz
PeerTube-fe1e3535fdd6edf5be0ac9ecb2ea80fb877751b3.tar.zst
PeerTube-fe1e3535fdd6edf5be0ac9ecb2ea80fb877751b3.zip
Ping runners on job abort/error
Diffstat (limited to 'server')
-rw-r--r--server/server/lib/runners/job-handlers/abstract-job-handler.ts4
1 files changed, 4 insertions, 0 deletions
diff --git a/server/server/lib/runners/job-handlers/abstract-job-handler.ts b/server/server/lib/runners/job-handlers/abstract-job-handler.ts
index b7e9a0a9d..9a2e2584c 100644
--- a/server/server/lib/runners/job-handlers/abstract-job-handler.ts
+++ b/server/server/lib/runners/job-handlers/abstract-job-handler.ts
@@ -213,6 +213,8 @@ export abstract class AbstractJobHandler <C, U extends RunnerJobUpdatePayload, S
213 runnerJob.resetToPending() 213 runnerJob.resetToPending()
214 214
215 await saveInTransactionWithRetries(runnerJob) 215 await saveInTransactionWithRetries(runnerJob)
216
217 PeerTubeSocket.Instance.sendAvailableJobsPingToRunners()
216 } 218 }
217 219
218 protected setAbortState (runnerJob: MRunnerJob) { 220 protected setAbortState (runnerJob: MRunnerJob) {
@@ -259,6 +261,8 @@ export abstract class AbstractJobHandler <C, U extends RunnerJobUpdatePayload, S
259 261
260 await this.error({ runnerJob: child, message: 'Parent error', fromParent: true }) 262 await this.error({ runnerJob: child, message: 'Parent error', fromParent: true })
261 } 263 }
264 } else {
265 PeerTubeSocket.Instance.sendAvailableJobsPingToRunners()
262 } 266 }
263 } 267 }
264 268