()
| 103 | } |
| 104 | |
| 105 | public run(): void { |
| 106 | this.interval = setInterval(async () => { |
| 107 | if (this.isRunning) { |
| 108 | logger('skipping scheduled maintenance run because previous run is still in progress') |
| 109 | return |
| 110 | } |
| 111 | |
| 112 | this.isRunning = true |
| 113 | try { |
| 114 | await this.onSchedule() |
| 115 | } catch (error) { |
| 116 | this.onError(error as Error) |
| 117 | } finally { |
| 118 | this.isRunning = false |
| 119 | } |
| 120 | }, UPDATE_INVOICE_INTERVAL) |
| 121 | } |
| 122 | |
| 123 | private async onSchedule(): Promise<void> { |
| 124 | const currentSettings = this.settings() |
nothing calls this directly
no test coverage detected