(error: any)
| 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()); |
nothing calls this directly
no test coverage detected