Shreyas arya

Generation

generate functionThu, 09 Feb 2023

When requests to Step Function fail, Workflow Service performs exponential backoff retries to notify Step Function service. Number of retries = 3 The total duration of all attempts doesn't exceed 10 seconds.

import time def retry(retry_count, delay_in_seconds): start_time = time.time() print("Start time: " + str(start_time)) for i in range(retry_count): time.sleep(delay_in_seconds) current_time = time.time() print("Current time: " + str(current_time)) print("Duration: " + str(current_time-start_time)) print("Try number: " + str(i)) retry(3, 2)

Questions about programming?Chat with your personal AI assistant