File tree Expand file tree Collapse file tree 1 file changed +4
-1
lines changed Expand file tree Collapse file tree 1 file changed +4
-1
lines changed Original file line number Diff line number Diff line change @@ -1538,6 +1538,7 @@ def create_alert(
1538
1538
] = "average" ,
1539
1539
notification : typing .Literal ["email" , "none" ] = "none" ,
1540
1540
pattern : typing .Optional [str ] = None ,
1541
+ trigger_abort : bool = False ,
1541
1542
) -> typing .Optional [str ]:
1542
1543
"""Creates an alert with the specified name (if it doesn't exist)
1543
1544
and applies it to the current run. If alert already exists it will
@@ -1597,6 +1598,8 @@ def create_alert(
1597
1598
whether to notify on trigger, by default "none"
1598
1599
pattern : str, optional
1599
1600
for event based alerts pattern to look for, by default None
1601
+ trigger_abort : bool, optional
1602
+ whether this alert can trigger a run abort
1600
1603
1601
1604
Returns
1602
1605
-------
@@ -1671,7 +1674,7 @@ def create_alert(
1671
1674
1672
1675
if alert_id :
1673
1676
# TODO: What if we keep existing alerts/add a new one later?
1674
- data = {"id" : self ._id , "alerts" : [alert_id ]}
1677
+ data = {"id" : self ._id , "alerts" : [alert_id ], "abort" : trigger_abort }
1675
1678
self ._simvue .update (data )
1676
1679
1677
1680
return alert_id
You can’t perform that action at this time.
0 commit comments