configurable price update frequency

This commit is contained in:
Mononaut authored and softsimon committed 2023-08-03 17:43:02 +09:00
1 parent 22665f149b
commit 09c23b1241
8 files changed
+13 -2

No files matched your search

+2 -2
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;
}