configurable price update frequency

This commit is contained in:
Mononaut
2023-07-29 14:45:00 +09:00
committed by softsimon
parent 22665f149b
commit 09c23b1241
8 changed files with 13 additions and 2 deletions

View File

@@ -108,8 +108,8 @@ class PriceUpdater {
this.lastRun = await PricesRepository.$getLatestPriceTime();
}
if ((Math.round(new Date().getTime() / 1000) - this.lastRun) < 3600) {
// Refresh only once every hour
if ((Math.round(new Date().getTime() / 1000) - this.lastRun) < config.PRICE_DATA_SERVER.UPDATE_FREQUENCY) {
// Refresh every UPDATE_FREQUENCY seconds at most
return;
}