-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Labels
julesFor Jules AI to work onFor Jules AI to work on
Description
Summary
Stop hammering domains that are consistently failing.
Use Case
If a domain returns 5 errors in a row, stop trying for a while instead of wasting time and bandwidth.
Circuit States
CLOSED → OPEN → HALF-OPEN → CLOSED
│ │ │
│ │ └─ Test request succeeds
│ └─ After cooldown period
└─ Failure threshold exceeded
Behaviour
- CLOSED: Normal operation, requests flow through
- OPEN: All requests fail immediately, no network calls
- HALF-OPEN: Allow one test request to check recovery
Commands
# Enable circuit breaker (default)
borg collect website https://example.com
# Disable
borg collect website https://example.com --no-circuit-breaker
# Custom thresholds
borg collect website https://example.com \
--circuit-failures 3 \
--circuit-cooldown 60sConfiguration
circuit_breaker:
failure_threshold: 5 # failures before opening
success_threshold: 2 # successes to close
cooldown: 30s # time in open state
half_open_requests: 1 # test requests in half-openLogging
[WARN] Circuit OPEN for api.github.com (5 consecutive failures)
[INFO] Circuit HALF-OPEN for api.github.com (testing recovery)
[INFO] Circuit CLOSED for api.github.com (recovered)
Acceptance Criteria
- Three-state circuit breaker
- Per-domain tracking
- Configurable thresholds
- Automatic recovery testing
- Clear logging of state changes
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
julesFor Jules AI to work onFor Jules AI to work on