From f7058450c62f21b20730a740af429fd364c064a9 Mon Sep 17 00:00:00 2001 From: Tom Beynon Date: Fri, 24 May 2024 16:41:38 +0100 Subject: [PATCH] Variable status check concurrency --- status/healthMonitor.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/status/healthMonitor.js b/status/healthMonitor.js index 429d7d8..8bd193d 100644 --- a/status/healthMonitor.js +++ b/status/healthMonitor.js @@ -8,10 +8,11 @@ const ALLOWED_ERRORS = 10 const ERROR_COOLDOWN = 10 * 60 const RATE_LIMIT_COOLDOWN = 3 * 24 * 60 * 60 const HEALTH_TIMEOUT = 5000 +const HEALTH_CONCURRENCY = parseInt(process.env.HEALTH_CONCURRENCY || 20) function HealthMonitor() { const agent = createAgent(); - const queue = new PQueue({ concurrency: 20 }); + const queue = new PQueue({ concurrency: HEALTH_CONCURRENCY }); async function refreshApis(client, chains) { timeStamp('Running health checks');