From 17dc5a674dfe787e43dc0f882ff001bc710d2dc9 Mon Sep 17 00:00:00 2001 From: ConjunctiveNormalForm Date: Fri, 11 Oct 2024 12:51:08 -0400 Subject: [PATCH] reduce-cbv2-lookback --- lib/providers/circuit-breaker/dynamo.ts | 4 ++-- lib/repositories/fades-repository.ts | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/providers/circuit-breaker/dynamo.ts b/lib/providers/circuit-breaker/dynamo.ts index 3ba8c487..d5125912 100644 --- a/lib/providers/circuit-breaker/dynamo.ts +++ b/lib/providers/circuit-breaker/dynamo.ts @@ -47,8 +47,8 @@ export class DynamoCircuitBreakerConfigurationProvider implements CircuitBreaker this.timestamps = await this.timestampDB.getFillerTimestampsMap(this.fillerEndpoints); } - /* add filler to `enabled` array if it's not blocked until a future timestamp - add disabled fillers and the `blockUntilTimestamp`s to disabled array */ + /* add filler to `enabled` array if it's not blocked until a future timestamp; + add disabled fillers and the `blockUntilTimestamp`s to disabled array */ async getEndpointStatuses(endpoints: WebhookConfiguration[]): Promise { try { const now = Math.floor(Date.now() / 1000); diff --git a/lib/repositories/fades-repository.ts b/lib/repositories/fades-repository.ts index 040bfcf2..ce0e0500 100644 --- a/lib/repositories/fades-repository.ts +++ b/lib/repositories/fades-repository.ts @@ -181,7 +181,7 @@ AND latestOrdersV2.quoteId IS NOT NULL AND rfqFiller != '0x0000000000000000000000000000000000000000' AND chainId NOT IN (5,8001,420,421613) -- exclude mainnet goerli, polygon goerli, optimism goerli and arbitrum goerli testnets AND - postTimestamp >= extract(epoch from (GETDATE() - INTERVAL '48 HOURS')) -- 2 days rolling window + postTimestamp >= extract(epoch from (GETDATE() - INTERVAL '20 MINUTE')) -- 20-minute rolling window ) ORDER BY rfqFiller, postTimestamp DESC LIMIT 1000