diff --git a/src/servers/plugins/release.ts b/src/servers/plugins/release.ts index 40a2fe9c..3dc90259 100644 --- a/src/servers/plugins/release.ts +++ b/src/servers/plugins/release.ts @@ -73,7 +73,18 @@ export type ReleaseState = { * Failure is silence. A checkout with no remote, an unreachable host, a repository that has moved — none * of those should surface as anything, because the list still has a true answer without them. */ -const REFRESH_MS = 10 * 60 * 1000; +/* + Two minutes, and the number is chosen for how releases are actually watched. + + It was ten. The way this gets used is: ship a plugin, open the page, look for the badge — and ten + minutes of that is indistinguishable from the feature not working. A release tagged at 12:42 was + invisible at 12:45 because the last fetch happened at 12:37, which is correct behaviour and no comfort. + + The cost is bounded by the page being open: nothing fetches when nobody is looking, and the fetches are + chained, so the worst case is one small round trip per plugin every two minutes while somebody watches + the plugins screen. +*/ +const REFRESH_MS = 2 * 60 * 1000; const fetchedAt = new Map(); let queue: Promise = Promise.resolve();