We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 18c9919 commit 2eb90a5Copy full SHA for 2eb90a5
src/helpers/strategies.ts
@@ -10,6 +10,7 @@ type Strategy = {
10
};
11
12
const RUN_INTERVAL = 60e3;
13
+const MAX_CONSECUTIVE_FAILS = 3;
14
const URI = new URL(
15
'/api/strategies',
16
process.env.SCORE_API_URL ?? 'https://score.snapshot.org'
@@ -49,7 +50,7 @@ export async function run() {
49
50
} catch (e: any) {
51
consecutiveFailsCount++;
52
- if (consecutiveFailsCount >= 3) {
53
+ if (consecutiveFailsCount >= MAX_CONSECUTIVE_FAILS) {
54
capture(e);
55
}
56
log.error(`[strategies] failed to load ${JSON.stringify(e)}`);
0 commit comments