Skip to content

Commit fdac82b

Browse files
committed
fix: restore on_retry param names with proper override hook comment
1 parent 2b021bf commit fdac82b

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

src/orb/infrastructure/resilience/strategy/exponential.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -92,12 +92,16 @@ def get_delay(self, attempt: int) -> float:
9292

9393
return delay
9494

95-
def on_retry(self, _attempt: int, _exception: Exception) -> None:
95+
def on_retry(self, attempt: int, exception: Exception) -> None:
9696
"""
9797
Handle retry event (logging, metrics).
9898
99+
This is a hook for subclasses to override — e.g. AWSRetryStrategy
100+
logs the attempt number and exception details here.
101+
99102
Args:
100103
attempt: Current attempt number (0-based)
101104
exception: Exception that occurred
102105
"""
103-
# This method can be extended for metrics collection in the future
106+
# Base implementation is intentionally empty — subclasses override this
107+
# to add logging, metrics, or other side effects on each retry.

0 commit comments

Comments
 (0)