fix: prevent unnecessary retries on last attempt in ID generation
Co-authored-by: aider (openrouter/openai/o3-mini-high) <aider@aider.chat>
This commit is contained in:
@@ -83,6 +83,7 @@ def get_unique_instance_id(config: AMQAdapter) -> int:
|
||||
logger.debug(f"Successfully obtained unique ID: {new_value}")
|
||||
return new_value
|
||||
logger.debug(f"CAS update failed on attempt {attempt + 1}, retrying...")
|
||||
if attempt < max_retries - 1:
|
||||
time.sleep(retry_delay_seconds * (1 << attempt)) # Exponential backoff
|
||||
index, data = c.get(consul_counter_key)
|
||||
if data is None:
|
||||
|
||||
Reference in New Issue
Block a user