mirror of https://github.com/Chocobozzz/PeerTube
Retry runner job db saving if needed
parent
6349881dbd
commit
f93bc6a8be
|
@ -86,15 +86,13 @@ export abstract class AbstractJobHandler <C, U extends RunnerJobUpdatePayload, S
|
||||||
priority
|
priority
|
||||||
})
|
})
|
||||||
|
|
||||||
const job = await sequelizeTypescript.transaction(async transaction => {
|
await saveInTransactionWithRetries(runnerJob)
|
||||||
return runnerJob.save({ transaction })
|
|
||||||
})
|
|
||||||
|
|
||||||
if (runnerJob.state === RunnerJobState.PENDING) {
|
if (runnerJob.state === RunnerJobState.PENDING) {
|
||||||
PeerTubeSocket.Instance.sendAvailableJobsPingToRunners()
|
PeerTubeSocket.Instance.sendAvailableJobsPingToRunners()
|
||||||
}
|
}
|
||||||
|
|
||||||
return job
|
return runnerJob
|
||||||
}
|
}
|
||||||
|
|
||||||
// ---------------------------------------------------------------------------
|
// ---------------------------------------------------------------------------
|
||||||
|
|
Loading…
Reference in New Issue