()
| 107 | } |
| 108 | |
| 109 | private async runCallbacks(): Promise<void> { |
| 110 | if (this.callbackQueue.size === 0) return |
| 111 | |
| 112 | for (const workUnitStore of this.workUnitStores) { |
| 113 | workUnitStore.phase = 'after' |
| 114 | } |
| 115 | |
| 116 | const workStore = workAsyncStorage.getStore() |
| 117 | if (!workStore) { |
| 118 | throw new InvariantError('Missing workStore in AfterContext.runCallbacks') |
| 119 | } |
| 120 | |
| 121 | return withExecuteRevalidates(workStore, () => { |
| 122 | this.callbackQueue.start() |
| 123 | return this.callbackQueue.onIdle() |
| 124 | }) |
| 125 | } |
| 126 | |
| 127 | private reportTaskError(taskKind: 'promise' | 'function', error: unknown) { |
| 128 | // TODO(after): this is fine for now, but will need better intergration with our error reporting. |
no test coverage detected