Skip to content

Commit 4b44bd4

Browse files
author
Michael Brewer
committed
chore(idempotency): simplify max_handler_retries
1 parent e21b97d commit 4b44bd4

File tree

2 files changed

+1
-5
lines changed

2 files changed

+1
-5
lines changed

aws_lambda_powertools/utilities/idempotency/idempotency.py

+1-4
Original file line numberDiff line numberDiff line change
@@ -78,9 +78,7 @@ def idempotent(
7878
try:
7979
return idempotency_handler.handle()
8080
except IdempotencyInconsistentStateError:
81-
if i < max_handler_retries:
82-
continue
83-
else:
81+
if i == max_handler_retries:
8482
# Allow the exception to bubble up after max retries exceeded
8583
raise
8684

@@ -117,7 +115,6 @@ def __init__(
117115
self.context = context
118116
self.event = event
119117
self.lambda_handler = lambda_handler
120-
self.max_handler_retries = 2
121118

122119
def handle(self) -> Any:
123120
"""

tests/functional/idempotency/test_idempotency.py

-1
Original file line numberDiff line numberDiff line change
@@ -395,7 +395,6 @@ def test_idempotent_lambda_expired_during_request(
395395
lambda_apigw_event,
396396
timestamp_expired,
397397
lambda_response,
398-
expected_params_update_item,
399398
hashed_idempotency_key,
400399
lambda_context,
401400
):

0 commit comments

Comments
 (0)