From ef9d4cdf949d0d2ffd47738cacec5368409e9f82 Mon Sep 17 00:00:00 2001 From: Chintan Raval Date: Sat, 7 Sep 2019 14:39:55 +1000 Subject: [PATCH] bug fix - if succeed, do not repeat :) --- rdl/data_sources/AWSLambdaDataSource.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/rdl/data_sources/AWSLambdaDataSource.py b/rdl/data_sources/AWSLambdaDataSource.py index edd048d..adb6949 100644 --- a/rdl/data_sources/AWSLambdaDataSource.py +++ b/rdl/data_sources/AWSLambdaDataSource.py @@ -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