Shorten time for re-call function for testing; log update-time

master
Martin Zwigl 2025-03-17 23:35:38 +01:00
parent b68684f34d
commit cd74cde50c
2 changed files with 9 additions and 2 deletions

View File

@ -75,6 +75,13 @@ layout.update();
//
function getChart(period) {
// Clear any existing timeout
if (updateTimeout) clearTimeout(updateTimeout);
//
const date = new Date().toDateString();
logFile.write("Called:" + date);
//
timePeriod = period;
currLoadMsg = `Load... ${period}`;
@ -103,7 +110,7 @@ function getChart(period) {
})
.finally(() => {
// Schedule next update regardless of success or failure
updateTimeout = setTimeout(getChart, 60000, period); // 5 minutes
updateTimeout = setTimeout(getChart, 30000, period); // 5 minutes
});
}

View File

@ -1,7 +1,7 @@
{ "id": "coin_info",
"name": "Crypto-Coins Info",
"shortName":"Coins Info",
"version": "0.06.46",
"version": "0.06.47",
"description": "Crypto-Coins Infos with the help of the Binance API",
"icon": "app.png",
"tags": "clkinfo",