12 lines
579 B
TypeScript
12 lines
579 B
TypeScript
|
|
// Shared timing constants. Keep magic numbers here so callers stay readable
|
||
|
|
// and the rationale lives next to the value.
|
||
|
|
|
||
|
|
// How long to wait for a Service Worker to answer GET_VERSION before
|
||
|
|
// treating the response as missing. Short on purpose — SWs that take this
|
||
|
|
// long are likely the Chromium zombie case (see pwa.svelte.ts).
|
||
|
|
export const SW_VERSION_QUERY_TIMEOUT_MS = 1500;
|
||
|
|
|
||
|
|
// Active update check while the page sits open in a tab. 30 minutes is a
|
||
|
|
// trade-off between being timely and not hammering the server.
|
||
|
|
export const SW_UPDATE_POLL_INTERVAL_MS = 30 * 60_000;
|