MCPcopy Create free account
hub / github.com/deta/surf / init

Method init

packages/services/src/lib/sync.ts:218–224  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

216 }
217
218 async init() {
219 const lastSync = get(this.lastSyncTime)
220 if (!lastSync || Date.now() - lastSync > MAX_SYNC_INTERVAL) {
221 await this.sync()
222 this.lastSyncTime.set(Date.now())
223 }
224 }
225}
226
227export const createSyncService = (resourceManager: ResourceManager) => {

Callers

nothing calls this directly

Calls 2

syncMethod · 0.95
getFunction · 0.85

Tested by

no test coverage detected