mirror of
https://github.com/BerriAI/litellm.git
synced 2026-10-10 03:28:53 +00:00
Emit supportability metric every hour instead of once a day.
This commit is contained in:
parent
478d8d1d52
commit
c6ea6b883c
1 changed files with 2 additions and 2 deletions
|
|
@ -152,8 +152,8 @@ class NewRelicLogger(CustomLogger):
|
|||
current_time = time.time()
|
||||
time_since_last_emission = current_time - _last_metric_emission_time
|
||||
|
||||
# 23 hours in seconds = 82800
|
||||
if time_since_last_emission >= 82800:
|
||||
# 1 hour in seconds = 3600
|
||||
if time_since_last_emission >= 3600:
|
||||
# Acquire lock to ensure only one thread emits
|
||||
with _metric_lock:
|
||||
# Double-check inside lock in case another thread just emitted
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue