MCPcopy Create free account
hub / github.com/cloudflare/computer / tick

Function tick

packages/rpc/src/sync-driver.ts:370–377  ·  view source on GitHub ↗
(
  db: Database,
  remote: SyncRPC,
)

Source from the content-addressed store, hash-verified

368// remote writes before we look at our own dirty set, so we don't
369// re-push entries that just came in.
370export 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.

Callers 3

startSyncLoopFunction · 0.90

Calls 2

pullOnceFunction · 0.85
pushOnceFunction · 0.85

Tested by

no test coverage detected