File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed
Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -25,7 +25,7 @@ class GuardrailChain:
2525 def __init__ (self , config_mgr ):
2626 self ._config = config_mgr
2727 self ._lock = threading .Lock ()
28- self ._last_global_fire : float = 0.0
28+ self ._last_global_fire : float = float ( "-inf" )
2929 self ._last_trigger_fire : dict [str , float ] = {}
3030 self ._hourly_fires : list [float ] = []
3131 self ._trigger_match_history : dict [str , list [float ]] = {}
@@ -86,7 +86,7 @@ def check_batch(self, trigger_results):
8686
8787 # 4. Per-trigger cooldown
8888 trigger_cd = int (self ._config .get ("sc_trigger_cooldown" , 900 ))
89- last_fire = self ._last_trigger_fire .get (trigger_key , 0.0 )
89+ last_fire = self ._last_trigger_fire .get (trigger_key , float ( "-inf" ) )
9090 if trigger_cd > 0 and (now - last_fire ) < trigger_cd :
9191 remaining = int (trigger_cd - (now - last_fire ))
9292 results .append ((trigger , event , False ,
You can’t perform that action at this time.
0 commit comments