MCPcopy
hub / github.com/aspen-cloud/triplit / initializeSync

Method initializeSync

packages/client/src/sync-engine.ts:837–848  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

835 }
836
837 private async initializeSync() {
838 const syncStatus = await this.syncWrites();
839 if (!syncStatus.didSync) {
840 this.logger.warn(
841 `Failed to send changes on initialization: ${syncStatus.syncFailureReason}`
842 );
843 }
844 // Reconnect any queries
845 for (const [id] of this.queries) {
846 this.connectQuery(id);
847 }
848 }
849
850 // TODO: add an onError handler to gracefully handle errors in message handlers
851 private onMessageHandler(session: SyncSession) {

Callers 1

onMessageHandlerMethod · 0.95

Calls 3

syncWritesMethod · 0.95
connectQueryMethod · 0.95
warnMethod · 0.45

Tested by

no test coverage detected