(scheduleOnFailure: boolean)
| 996 | } |
| 997 | |
| 998 | const flushCore = async (scheduleOnFailure: boolean) => { |
| 999 | await writeQueue |
| 1000 | const ok = await flushPending(scheduleOnFailure) |
| 1001 | if (writeFailure) { |
| 1002 | throw writeFailure |
| 1003 | } |
| 1004 | if (!ok) { |
| 1005 | throw new Error(`Failed to flush execution events for ${executionId}`) |
| 1006 | } |
| 1007 | } |
| 1008 | |
| 1009 | const flush = async () => { |
| 1010 | await flushCore(true) |
no test coverage detected