]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/commitdiff
Ping runners on job abort/error
authorChocobozzz <me@florianbigard.com>
Mon, 28 Aug 2023 14:58:21 +0000 (16:58 +0200)
committerChocobozzz <me@florianbigard.com>
Mon, 28 Aug 2023 14:59:45 +0000 (16:59 +0200)
server/server/lib/runners/job-handlers/abstract-job-handler.ts

index b7e9a0a9dbd363d2b58bcb936ff03f79835659c8..9a2e2584c7082538f3ad18bcdbf8e9f486168be6 100644 (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()
     }
   }