MCPcopy Index your code
hub / github.com/codeaashu/claude-code / fetchTeamMemory

Function fetchTeamMemory

src/services/teamMemorySync/index.ts:387–410  ·  view source on GitHub ↗
(
  state: SyncState,
  repoSlug: string,
  etag?: string | null,
)

Source from the content-addressed store, hash-verified

385}
386
387async function fetchTeamMemory(
388 state: SyncState,
389 repoSlug: string,
390 etag?: string | null,
391): Promise<TeamMemorySyncFetchResult> {
392 let lastResult: TeamMemorySyncFetchResult | null = null
393
394 for (let attempt = 1; attempt <= MAX_RETRIES + 1; attempt++) {
395 lastResult = await fetchTeamMemoryOnce(state, repoSlug, etag)
396 if (lastResult.success || lastResult.skipRetry) {
397 return lastResult
398 }
399 if (attempt > MAX_RETRIES) {
400 return lastResult
401 }
402 const delayMs = getRetryDelay(attempt)
403 logForDebugging(`team-memory-sync: retry ${attempt}/${MAX_RETRIES}`, {
404 level: 'debug',
405 })
406 await sleep(delayMs)
407 }
408
409 return lastResult!
410}
411
412// ─── Upload (push) ───────────────────────────────────────────
413

Callers 1

pullTeamMemoryFunction · 0.85

Calls 4

fetchTeamMemoryOnceFunction · 0.85
getRetryDelayFunction · 0.85
logForDebuggingFunction · 0.85
sleepFunction · 0.50

Tested by

no test coverage detected