MCPcopy Create free account
hub / github.com/CommonstackAI/UncommonRoute / record_failure

Method record_failure

uncommon_route/circuit_breaker.py:32–37  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

30 total_successes: int = 0
31
32 def record_failure(self) -> None:
33 self.consecutive_failures += 1
34 self.total_failures += 1
35 self.last_failure_at = time.time()
36 if self.consecutive_failures >= FAILURE_THRESHOLD:
37 self.state = "open"
38
39 def record_success(self) -> None:
40 self.consecutive_failures = 0

Callers 3

record_failureMethod · 0.45
_record_stream_failureFunction · 0.45
_handle_chat_coreFunction · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected