Skip to content

Commit

Permalink
Merge pull request #3 from sclausson/master
Browse files Browse the repository at this point in the history
Convert SLEEP_TIME to integer
  • Loading branch information
sclausson committed May 15, 2019
2 parents 4b18251 + cdc505b commit 0292b91
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 0292b91

Please sign in to comment.