MCPcopy Create free account
hub / github.com/codeaashu/claude-code / startBackgroundPolling

Function startBackgroundPolling

src/services/remoteManagedSettings/index.ts:612–628  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

610 * Polls every hour to pick up settings changes mid-session
611 */
612export function startBackgroundPolling(): void {
613 if (pollingIntervalId !== null) {
614 return
615 }
616
617 if (!isRemoteManagedSettingsEligible()) {
618 return
619 }
620
621 pollingIntervalId = setInterval(() => {
622 void pollRemoteSettings()
623 }, POLLING_INTERVAL_MS)
624 pollingIntervalId.unref()
625
626 // Register cleanup to stop polling on shutdown
627 registerCleanup(async () => stopBackgroundPolling())
628}
629
630/**
631 * Stop background polling for remote settings

Callers 1

Calls 4

pollRemoteSettingsFunction · 0.85
registerCleanupFunction · 0.85
stopBackgroundPollingFunction · 0.70

Tested by

no test coverage detected