Update price at least every hour

This commit is contained in:
softsimon committed 2023-08-03 17:43:02 +09:00
1 parent 4ffc3d0ce5
commit 16b75c6ab3
1 file changed
+2 -2
+2 -2
View File
@@ -108,8 +108,8 @@ class PriceUpdater {
this.lastRun = await PricesRepository.$getLatestPriceTime();
}
if ((Math.round(new Date().getTime() / 1000) - this.lastRun) < config.MEMPOOL.PRICE_UPDATE_FREQUENCY) {
// Refresh every PRICE_UPDATE_FREQUENCY seconds at most
if ((Math.round(new Date().getTime() / 1000) - this.lastRun) < Math.min(config.MEMPOOL.PRICE_UPDATE_FREQUENCY, 3600)) {
// Refresh at least every hour or PRICE_UPDATE_FREQUENCY seconds
return;
}