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

chore: reduce cbv2 lookback window #380

Merged
merged 1 commit into from
Oct 11, 2024
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 lib/providers/circuit-breaker/dynamo.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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<EndpointStatuses> {
try {
const now = Math.floor(Date.now() / 1000);
Expand Down
2 changes: 1 addition & 1 deletion lib/repositories/fades-repository.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Loading