MCPcopy Create free account
hub / github.com/DialmasterOrg/Youtarr / scheduleSaveRetry

Method scheduleSaveRetry

server/modules/jobModule.js:1057–1070  ·  view source on GitHub ↗
(jobId, attempt)

Source from the content-addressed store, hash-verified

1055 }
1056
1057 scheduleSaveRetry(jobId, attempt) {
1058 const job = this.jobs[jobId];
1059 if (!job) {
1060 logger.warn({ jobId }, 'Cannot schedule retry for missing job');
1061 return;
1062 }
1063
1064 const retryDelay = 1000 * attempt; // Exponential backoff: 1s, 2s, 3s
1065 logger.info({ jobId, attempt, maxRetries: MAX_SAVE_RETRIES, retryDelay }, 'Will retry save for job');
1066
1067 setTimeout(() => {
1068 this.runSaveRetry(jobId, attempt);
1069 }, retryDelay);
1070 }
1071
1072 async runSaveRetry(jobId, attempt) {
1073 const jobBeforeRetry = this.jobs[jobId];

Callers 2

updateJobMethod · 0.95
runSaveRetryMethod · 0.95

Calls 1

runSaveRetryMethod · 0.95

Tested by

no test coverage detected