Skip to content
This repository was archived by the owner on Mar 13, 2020. It is now read-only.

Commit 8fcce0a

Browse files
authored
Merge pull request #71 from pageuppeople-opensource/feature/SP-389-add-retry-policy-when-invoking-lambda
bug fix - if succeed, do not repeat :)
2 parents 845026f + ef9d4cd commit 8fcce0a

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

rdl/data_sources/AWSLambdaDataSource.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -184,9 +184,11 @@ def __invoke_lambda(self, pay_load):
184184
# BUT the lambda barfed with an error and therefore the FunctionError would not be None
185185
self.logger.error(response_payload)
186186

187-
if current_attempt >= max_attempts:
187+
if current_attempt == max_attempts:
188188
raise Exception(
189189
"Error received when invoking AWS Lambda. See logs for further details."
190190
)
191+
else:
192+
break
191193

192194
return response_payload

0 commit comments

Comments
 (0)