Run hashrate indexing after midnight

This commit is contained in:
nymkappa
2022-04-30 17:54:49 +09:00
parent bf314be7eb
commit b56f110f28
3 changed files with 23 additions and 21 deletions

View File

@@ -174,8 +174,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));
}