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

Commit

Permalink
Merge pull request #71 from pageuppeople-opensource/feature/SP-389-ad…
Browse files Browse the repository at this point in the history
…d-retry-policy-when-invoking-lambda

bug fix - if succeed, do not repeat :)
  • Loading branch information
ChintanRaval authored Sep 8, 2019
2 parents 845026f + ef9d4cd commit 8fcce0a
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion rdl/data_sources/AWSLambdaDataSource.py
Original file line number Diff line number Diff line change
Expand Up @@ -184,9 +184,11 @@ def __invoke_lambda(self, pay_load):
# BUT the lambda barfed with an error and therefore the FunctionError would not be None
self.logger.error(response_payload)

if current_attempt >= max_attempts:
if current_attempt == max_attempts:
raise Exception(
"Error received when invoking AWS Lambda. See logs for further details."
)
else:
break

return response_payload

0 comments on commit 8fcce0a

Please sign in to comment.