two minutes, not ten
The way this gets used is: ship a plugin, open the page, look for the badge. 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 was at 12:37, which is correct and no comfort. Bounded by the page being open: nothing fetches when nobody is looking. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -73,7 +73,18 @@ export type ReleaseState = {
|
|||||||
* Failure is silence. A checkout with no remote, an unreachable host, a repository that has moved — none
|
* 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.
|
* 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<string, number>();
|
const fetchedAt = new Map<string, number>();
|
||||||
let queue: Promise<unknown> = Promise.resolve();
|
let queue: Promise<unknown> = Promise.resolve();
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user