From cdc505b37321a694d587c57b38f3fdce0f2026ea Mon Sep 17 00:00:00 2001 From: Shayne Clausson Date: Wed, 15 May 2019 09:43:02 +0200 Subject: [PATCH] Convert SLEEP_TIME to integer --- index/index.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/index/index.py b/index/index.py index 82039bf..cc5d37f 100644 --- a/index/index.py +++ b/index/index.py @@ -53,7 +53,7 @@ def lambda_handler(event, context): if instance_has_running_tasks(msg['EC2InstanceId']): print('Tasks are still running on instance %s; posting msg to SNS topic %s' % (msg['EC2InstanceId'], event['Records'][0]['Sns']['TopicArn'])) - time.sleep(SLEEP_TIME) + time.sleep(int(SLEEP_TIME)) sns_resp = SNS.publish(TopicArn=event['Records'][0]['Sns']['TopicArn'], Message=json.dumps(msg), Subject='Publishing SNS msg to invoke Lambda again.')