fix don't retry errors when no healthy deployments available

This commit is contained in:
Ishaan Jaff 2024-08-20 12:17:05 -07:00
parent 19c3a82d1b
commit e28b240a5b
2 changed files with 64 additions and 0 deletions

View file

@ -2727,6 +2727,11 @@ class Router:
if _num_healthy_deployments <= 0: # if no healthy deployments
raise error # then raise error
# Do not retry if there are no healthy deployments
# just raise the error
if _num_healthy_deployments <= 0: # if no healthy deployments
raise error
return True
def function_with_fallbacks(self, *args, **kwargs):