Skip to content

Commit

Permalink
Convert SLEEP_TIME to integer
Browse files Browse the repository at this point in the history
  • Loading branch information
sclausson committed May 15, 2019
1 parent 6e10ba0 commit cdc505b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion index/index.py
Original file line number Diff line number Diff line change
Expand Up @@ -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.')
Expand Down

0 comments on commit cdc505b

Please sign in to comment.