Merge pull request #1590 from mempool/nymkappa/feature/hashrate-around-midnight

Run hashrate indexing after midnight
This commit is contained in:
wiz
2022-05-09 10:45:24 +09:00
committed by GitHub
3 changed files with 23 additions and 21 deletions

View File

@@ -175,8 +175,8 @@ class Server {
async $resetHashratesIndexingState() {
try {
await HashratesRepository.$setLatestRunTimestamp('last_hashrates_indexing', 0);
await HashratesRepository.$setLatestRunTimestamp('last_weekly_hashrates_indexing', 0);
await HashratesRepository.$setLatestRun('last_hashrates_indexing', 0);
await HashratesRepository.$setLatestRun('last_weekly_hashrates_indexing', 0);
} catch (e) {
logger.err(`Cannot reset hashrate indexing timestamps. Reason: ` + (e instanceof Error ? e.message : e));
}