update alert_to_webhook_url

This commit is contained in:
Ishaan Jaff 2024-07-23 10:07:08 -07:00
parent 4559970a44
commit c1593c0cd1

View file

@ -202,6 +202,7 @@ class ProxyLogging:
redis_cache: Optional[RedisCache] = None,
alert_types: Optional[List[AlertType]] = None,
alerting_args: Optional[dict] = None,
alert_to_webhook_url: Optional[dict] = None,
):
updated_slack_alerting: bool = False
if alerting is not None:
@ -213,6 +214,9 @@ class ProxyLogging:
if alert_types is not None:
self.alert_types = alert_types
updated_slack_alerting = True
if alert_to_webhook_url is not None:
self.alert_to_webhook_url = alert_to_webhook_url
updated_slack_alerting = True
if updated_slack_alerting is True:
self.slack_alerting_instance.update_values(
@ -220,6 +224,7 @@ class ProxyLogging:
alerting_threshold=self.alerting_threshold,
alert_types=self.alert_types,
alerting_args=alerting_args,
alert_to_webhook_url=self.alert_to_webhook_url,
)
if (