From 79d7cf87a36d16a8d09ff6b746d1a7aff608d2bc Mon Sep 17 00:00:00 2001 From: Spythere Date: Sun, 5 Dec 2021 16:16:35 +0100 Subject: [PATCH] =?UTF-8?q?Czas=20przerwy=20pomi=C4=99dzy=20=C5=82adowania?= =?UTF-8?q?mi=20danych=20z=20API=20zosta=C5=82=20zmieniony=20na=20losow?= =?UTF-8?q?=C4=85=20warto=C5=9B=C4=87=20pomi=C4=99dzy=2025=20i=2030=20seku?= =?UTF-8?q?nd?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/store/index.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/store/index.ts b/src/store/index.ts index 368aa9c..d3be3dc 100644 --- a/src/store/index.ts +++ b/src/store/index.ts @@ -92,7 +92,10 @@ export const store = createStore({ dispatch(ACTIONS.fetchOnlineData); - setInterval(() => dispatch(ACTIONS.fetchOnlineData), 30000); + + const randIntervalTime = Math.floor(Math.random() * 5000) + 25000; + + setInterval(() => dispatch(ACTIONS.fetchOnlineData), randIntervalTime); }, async fetchOnlineData({ commit, dispatch }) {