From f93bc6a8be2c6d716ae16b7a51d787ac0f3f8347 Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Fri, 24 Nov 2023 14:44:04 +0100 Subject: [PATCH] Retry runner job db saving if needed --- .../core/lib/runners/job-handlers/abstract-job-handler.ts | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/server/core/lib/runners/job-handlers/abstract-job-handler.ts b/server/core/lib/runners/job-handlers/abstract-job-handler.ts index 9a2e2584c..1cc8f236c 100644 --- a/server/core/lib/runners/job-handlers/abstract-job-handler.ts +++ b/server/core/lib/runners/job-handlers/abstract-job-handler.ts @@ -86,15 +86,13 @@ export abstract class AbstractJobHandler { - return runnerJob.save({ transaction }) - }) + await saveInTransactionWithRetries(runnerJob) if (runnerJob.state === RunnerJobState.PENDING) { PeerTubeSocket.Instance.sendAvailableJobsPingToRunners() } - return job + return runnerJob } // ---------------------------------------------------------------------------