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

Removed circuit breaker #1138

Merged
merged 1 commit into from
Dec 11, 2024
Merged
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
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
import { EvmClient } from '../clients/evm.js';
import { INewSignatureRequest } from '../types/warden/newSignatureRequest.js';
import { Processor } from './processor.js';
import { circuitBreaker, ConsecutiveBreaker, ExponentialBackoff, handleAll, IPolicy, retry, wrap } from 'cockatiel';

Check failure on line 6 in automated-orders/packages/blockchain-library/src/processors/newSignatureProcessor.ts

View workflow job for this annotation

GitHub Actions / build

'circuitBreaker' is defined but never used. Allowed unused vars must match /_/u

Check failure on line 6 in automated-orders/packages/blockchain-library/src/processors/newSignatureProcessor.ts

View workflow job for this annotation

GitHub Actions / build

'ConsecutiveBreaker' is defined but never used. Allowed unused vars must match /_/u

Check failure on line 6 in automated-orders/packages/blockchain-library/src/processors/newSignatureProcessor.ts

View workflow job for this annotation

GitHub Actions / build

'wrap' is defined but never used. Allowed unused vars must match /_/u

Check failure on line 6 in automated-orders/packages/blockchain-library/src/processors/newSignatureProcessor.ts

View workflow job for this annotation

GitHub Actions / build

'circuitBreaker' is defined but never used. Allowed unused vars must match /_/u

Check failure on line 6 in automated-orders/packages/blockchain-library/src/processors/newSignatureProcessor.ts

View workflow job for this annotation

GitHub Actions / build

'ConsecutiveBreaker' is defined but never used. Allowed unused vars must match /_/u

Check failure on line 6 in automated-orders/packages/blockchain-library/src/processors/newSignatureProcessor.ts

View workflow job for this annotation

GitHub Actions / build

'wrap' is defined but never used. Allowed unused vars must match /_/u
import { WardenRegistryClient } from '../clients/registry.js';

export class NewSignatureProcessor extends Processor<INewSignatureRequest> {
Expand All @@ -17,13 +17,8 @@
super(generator);

const retryPolicy = retry(handleAll, { maxAttempts: 3, backoff: new ExponentialBackoff() });

const circuitBreakerPolicy = circuitBreaker(handleAll, {
halfOpenAfter: 10 * 1000,
breaker: new ConsecutiveBreaker(5),
});

this.retryPolicy = wrap(retryPolicy, circuitBreakerPolicy);
// TODO AT: Add circuit breaker
this.retryPolicy = retryPolicy;
}

async handle(data: INewSignatureRequest): Promise<void> {
Expand Down
Loading