Skip to content

Commit

Permalink
fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
mikecot committed Feb 3, 2025
1 parent 4518063 commit 3486a74
Show file tree
Hide file tree
Showing 8 changed files with 73 additions and 3,490 deletions.
11 changes: 7 additions & 4 deletions src/redis/classes/IndexerRedisResourceCaller.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ import { LockedTokenValuesResource } from '../resources/ajax/LockedTokenValuesRe
import { LockedVestingTokensService } from '../resources/global/LockedVestingTokensResource';
import { IpRpcEndpointsIndexService } from '../resources/IpRpcEndpointsIndex/IpRpcEndpointsResource';
import { MainnetProviderEstimatedRewardsListService } from '../resources/MainnetProviderEstimatedRewards/MainnetProviderEstimatedRewardsListResource';
import { IsMainnet } from '@jsinfo/utils/env';

export class IndexerRedisResourceCaller {
private static readonly REFRESH_INTERVAL = 60 * 1000; // 1 minute
Expand Down Expand Up @@ -270,10 +271,12 @@ export class IndexerRedisResourceCaller {
}

private static async refreshMainnetProviderEstimatedRewards(): Promise<void> {
await this.safeFetch('MainnetProviderEstimatedRewards',
() => MainnetProviderEstimatedRewardsListService.fetch(),
this.currentFetches
).catch(e => logger.error('Failed to refresh mainnet provider estimated rewards:', e));
if (IsMainnet()) {
await this.safeFetch('MainnetProviderEstimatedRewards',
() => MainnetProviderEstimatedRewardsListService.fetch(),
this.currentFetches
).catch(e => logger.error('Failed to refresh mainnet provider estimated rewards:', e));
}
}
}

Loading

0 comments on commit 3486a74

Please sign in to comment.