-
Notifications
You must be signed in to change notification settings - Fork 11
Open
Description
It is hard to calculate how many time we will wait for each loop when they are based on counting retries
Loops like:
for trying in range(1, 101):
[...]
logging.error("Failed to get namespace for %s on the %s cluster after 100 retries" % (cluster_name, type))
Can be moved to:
wait_time = 30 # (minutes)
starting_time = datetime.datetime.utcnow().timestamp()
while datetime.datetime.utcnow().timestamp() < starting_time + wait_time * 60:
[...]
logging.error("Waiting time expired. After %d minutes there are %d ready nodes (Expected: %d) on cluster %s" % (wait_time, ready_nodes, worker_nodes, cluster_name))
Metadata
Metadata
Assignees
Labels
No labels