From f0bf066cfdba350db3349f00f554fc1d56287379 Mon Sep 17 00:00:00 2001 From: Overtorment Date: Fri, 14 May 2021 11:10:41 +0100 Subject: [PATCH] FIX: updateDescribeGraph() is disabled by default (too slow on low-end machines) --- config.js | 1 + controllers/api.js | 6 ++++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/config.js b/config.js index 204e847..5fe3360 100644 --- a/config.js +++ b/config.js @@ -1,4 +1,5 @@ let config = { + enableUpdateDescribeGraph: false, postRateLimit: 100, rateLimit: 200, bitcoind: { diff --git a/controllers/api.js b/controllers/api.js index ae8eb1d..1f9d42c 100644 --- a/controllers/api.js +++ b/controllers/api.js @@ -118,8 +118,10 @@ function updateDescribeGraph() { console.log('updated graph'); }); } -updateDescribeGraph(); -setInterval(updateDescribeGraph, 120000); +if (config.enableUpdateDescribeGraph) { + updateDescribeGraph(); + setInterval(updateDescribeGraph, 120000); +} // ######################## ROUTES ########################