Retry runner job db saving if needed

This commit is contained in:
Chocobozzz 2023-11-24 14:44:04 +01:00
parent 6349881dbd
commit f93bc6a8be
No known key found for this signature in database
GPG Key ID: 583A612D890159BE
1 changed files with 2 additions and 4 deletions

View File

@ -86,15 +86,13 @@ export abstract class AbstractJobHandler <C, U extends RunnerJobUpdatePayload, S
priority
})
const job = await sequelizeTypescript.transaction(async transaction => {
return runnerJob.save({ transaction })
})
await saveInTransactionWithRetries(runnerJob)
if (runnerJob.state === RunnerJobState.PENDING) {
PeerTubeSocket.Instance.sendAvailableJobsPingToRunners()
}
return job
return runnerJob
}
// ---------------------------------------------------------------------------