()
| 367 | } |
| 368 | |
| 369 | async function flushDiffRecords(): Promise<void> { |
| 370 | await database |
| 371 | .writeTransaction(async (context) => { |
| 372 | await flushDiffRecordsWithContext(context) |
| 373 | }) |
| 374 | .catch((error) => { |
| 375 | database.logger.error( |
| 376 | `An error has been detected in the sync handler`, |
| 377 | error, |
| 378 | ) |
| 379 | }) |
| 380 | } |
| 381 | |
| 382 | // We can use this directly if we want to pair a flush with dispose+recreate diff trigger. |
| 383 | async function flushDiffRecordsWithContext( |
no test coverage detected