( db: Database, remote: SyncRPC, )
| 368 | // remote writes before we look at our own dirty set, so we don't |
| 369 | // re-push entries that just came in. |
| 370 | export async function tick( |
| 371 | db: Database, |
| 372 | remote: SyncRPC, |
| 373 | ): Promise<{ pulled: ApplyResult; pushed: number }> { |
| 374 | const pulled = await pullOnce(db, remote); |
| 375 | const pushed = await pushOnce(db, remote); |
| 376 | return { pulled, pushed }; |
| 377 | } |
| 378 | |
| 379 | // Reconcile local watermarks against the remote's view of the world. |
| 380 | // Called on (re)connect, before any push or pull tick. |
no test coverage detected