mirror of
https://github.com/BerriAI/litellm.git
synced 2025-04-27 03:34:10 +00:00
Merge pull request #4518 from BerriAI/litellm_fix_background_health_checks
[Fix-Proxy] Background health checks use deep copy of model list for _run_background_health_check
This commit is contained in:
commit
424825be48
1 changed files with 5 additions and 1 deletions
|
@ -1182,9 +1182,13 @@ async def _run_background_health_check():
|
||||||
Update health_check_results, based on this.
|
Update health_check_results, based on this.
|
||||||
"""
|
"""
|
||||||
global health_check_results, llm_model_list, health_check_interval
|
global health_check_results, llm_model_list, health_check_interval
|
||||||
|
|
||||||
|
# make 1 deep copy of llm_model_list -> use this for all background health checks
|
||||||
|
_llm_model_list = copy.deepcopy(llm_model_list)
|
||||||
|
|
||||||
while True:
|
while True:
|
||||||
healthy_endpoints, unhealthy_endpoints = await perform_health_check(
|
healthy_endpoints, unhealthy_endpoints = await perform_health_check(
|
||||||
model_list=llm_model_list
|
model_list=_llm_model_list
|
||||||
)
|
)
|
||||||
|
|
||||||
# Update the global variable with the health check results
|
# Update the global variable with the health check results
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue