MCPcopy Create free account
hub / github.com/TeleBoxOrg/TeleBox_Plugins / scheduleRetry

Method scheduleRetry

tmp_admin/tmp_admin.ts:707–728  ·  view source on GitHub ↗
(error: any)

Source from the content-addressed store, hash-verified

705 };
706
707 const scheduleRetry = (error: any) => {
708 if (job.retryCount >= maxExpiryRetries) {
709 this.jobs.delete(key);
710 void this.deleteStoredJobQuiet(key);
711 void this.sendReplyQuiet(
712 job,
713 `临时管理员到期自动解除失败, 已重试 ${maxExpiryRetries} 次: ${codeTag(
714 error?.message || error
715 )}`
716 );
717 return;
718 }
719
720 job.retryCount += 1;
721 void this.persistJobQuiet(key, job);
722 console.error(
723 `[tmp_admin] 临时管理员到期解除失败, ${expiryRetryDelayMs / 1000}s 后重试 ${key} (${job.retryCount}/${maxExpiryRetries}):`,
724 error
725 );
726 this.jobs.set(key, job);
727 scheduleWithDelay(expiryRetryDelayMs);
728 };
729
730 const scheduleNext = () => {
731 const delay = Math.max(0, job.expiresAt - Date.now());

Callers

nothing calls this directly

Calls 7

deleteStoredJobQuietMethod · 0.95
sendReplyQuietMethod · 0.95
persistJobQuietMethod · 0.95
errorMethod · 0.80
codeTagFunction · 0.70
deleteMethod · 0.45
setMethod · 0.45

Tested by

no test coverage detected