Skip to content

Commit

Permalink
revision
Browse files Browse the repository at this point in the history
  • Loading branch information
jerryfan01234 committed Sep 20, 2024
1 parent 4703589 commit cade120
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -275,7 +275,11 @@ describe('update-affiliate-info', () => {

await affiliateInfoUpdateTask();

expect(stats.gauge).toHaveBeenCalledWith(`roundtable.persistent_cache_${PersistentCacheKeys.AFFILIATE_INFO_UPDATE_TIME}_lag_seconds`, expect.any(Number));
expect(stats.gauge).toHaveBeenCalledWith(
`roundtable.persistent_cache_${PersistentCacheKeys.AFFILIATE_INFO_UPDATE_TIME}_lag_seconds`,
expect.any(Number),
{ cache: PersistentCacheKeys.AFFILIATE_INFO_UPDATE_TIME },
);
});
});

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -234,7 +234,11 @@ describe('update-wallet-total-volume', () => {

await walletTotalVolumeUpdateTask();

expect(stats.gauge).toHaveBeenCalledWith(`roundtable.persistent_cache_${PersistentCacheKeys.TOTAL_VOLUME_UPDATE_TIME}_lag_seconds`, expect.any(Number));
expect(stats.gauge).toHaveBeenCalledWith(
`roundtable.persistent_cache_${PersistentCacheKeys.TOTAL_VOLUME_UPDATE_TIME}_lag_seconds`,
expect.any(Number),
{ cache: PersistentCacheKeys.TOTAL_VOLUME_UPDATE_TIME },
);
});
});

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ export default async function runTask(): Promise<void> {
stats.gauge(
`${config.SERVICE_NAME}.persistent_cache_${PersistentCacheKeys.AFFILIATE_INFO_UPDATE_TIME}_lag_seconds`,
DateTime.utc().diff(windowStartTime).as('seconds'),
{ cache: PersistentCacheKeys.AFFILIATE_INFO_UPDATE_TIME },
);

let windowEndTime = DateTime.fromISO(latestBlock.time);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ export default async function runTask(): Promise<void> {
stats.gauge(
`${config.SERVICE_NAME}.persistent_cache_${PersistentCacheKeys.TOTAL_VOLUME_UPDATE_TIME}_lag_seconds`,
DateTime.utc().diff(windowStartTime).as('seconds'),
{ cache: PersistentCacheKeys.TOTAL_VOLUME_UPDATE_TIME },
);

let windowEndTime = DateTime.fromISO(latestBlock.time);
Expand Down

0 comments on commit cade120

Please sign in to comment.