forked from phoenix/litellm-mirror
Merge pull request #4732 from BerriAI/litellm_fix_slack_alerting_issue
[Fix-Proxy] Slack Alerting Store Request Status in memory
This commit is contained in:
commit
c1633c0f79
1 changed files with 8 additions and 1 deletions
|
@ -284,11 +284,18 @@ class ProxyLogging:
|
|||
if self.alerting is None:
|
||||
return
|
||||
|
||||
# current alerting threshold
|
||||
alerting_threshold: float = self.alerting_threshold
|
||||
|
||||
# add a 100 second buffer to the alerting threshold
|
||||
# ensures we don't send errant hanging request slack alerts
|
||||
alerting_threshold += 100
|
||||
|
||||
await self.internal_usage_cache.async_set_cache(
|
||||
key="request_status:{}".format(litellm_call_id),
|
||||
value=status,
|
||||
local_only=True,
|
||||
ttl=120,
|
||||
ttl=alerting_threshold,
|
||||
)
|
||||
|
||||
# The actual implementation of the function
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue