Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[SERVICES-2584] Update cache warmer delay to config value #1468

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/services/crons/analytics.cache.warmer.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -51,13 +51,13 @@ export class AnalyticsCacheWarmerService {
awsOneYear(),
'feeBurned',
);
delay(1000);
delay(constantsConfig.AWS_QUERY_CACHE_WARMER_DELAY);
const penaltyBurned = await this.analyticsCompute.computeTokenBurned(
constantsConfig.MEX_TOKEN_ID,
awsOneYear(),
'penaltyBurned',
);
delay(1000);
delay(constantsConfig.AWS_QUERY_CACHE_WARMER_DELAY);
const cachedKeys = await Promise.all([
this.analyticsSetter.feeTokenBurned(
constantsConfig.MEX_TOKEN_ID,
Expand Down
8 changes: 4 additions & 4 deletions src/services/crons/pair.cache.warmer.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -90,26 +90,26 @@ export class PairCacheWarmerService {
metric: 'firstTokenVolume',
time,
});
await delay(1000);
await delay(constantsConfig.AWS_QUERY_CACHE_WARMER_DELAY);
const secondTokenVolume24h =
await this.analyticsQuery.getAggregatedValue({
series: pairAddress,
metric: 'secondTokenVolume',
time,
});
await delay(1000);
await delay(constantsConfig.AWS_QUERY_CACHE_WARMER_DELAY);
const volumeUSD24h = await this.analyticsQuery.getAggregatedValue({
series: pairAddress,
metric: 'volumeUSD',
time,
});
await delay(1000);
await delay(constantsConfig.AWS_QUERY_CACHE_WARMER_DELAY);
const feesUSD24h = await this.analyticsQuery.getAggregatedValue({
series: pairAddress,
metric: 'feesUSD',
time,
});
await delay(1000);
await delay(constantsConfig.AWS_QUERY_CACHE_WARMER_DELAY);

const cachedKeys = await Promise.all([
this.pairSetterService.setFirstTokenVolume(
Expand Down
Loading