Last active
April 17, 2019 15:15
-
-
Save keithrozario/ea4c63ed056bab69399a34c1996eed67 to your computer and use it in GitHub Desktop.
Reinvoke Lambdas
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
message['ContinuationToken'] = token | |
if context.get_remaining_time_in_millis() < reinvoke_seconds * 1000: | |
logger.info(f"Running out of time, invoking new lambda") | |
response = sqs_client.send_message(QueueUrl=os.environ['sqs_list_bucket_url'], | |
MessageBody=json.dumps(message), | |
DelaySeconds=2) | |
logger.info(f"Called new message with messageId: {response['MessageId']}") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment