File tree Expand file tree Collapse file tree 1 file changed +7
-4
lines changed
Expand file tree Collapse file tree 1 file changed +7
-4
lines changed Original file line number Diff line number Diff line change @@ -187,10 +187,10 @@ async def is_safe(self) -> tuple[bool, ActiveAlert]:
187187 active_alerts = ActiveAlert (0 )
188188
189189 # Keep track of how long the overwatcher has been idle.
190- if self .overwatcher .state .idle and self .overwaidle_since == 0 :
191- self .overwaidle_since = time ()
190+ if self .overwatcher .state .idle and self .overwatcher_idle_since == 0 :
191+ self .overwatcher_idle_since = time ()
192192 elif not self .overwatcher .state .idle :
193- self .overwaidle_since = 0
193+ self .overwatcher_idle_since = 0
194194
195195 if self .alerts_data_unavailable :
196196 self .log .warning ("Alerts data is unavailable." )
@@ -265,7 +265,10 @@ async def is_safe(self) -> tuple[bool, ActiveAlert]:
265265 # If it's safe to observe but we have been idle for a while, we
266266 # raise an alert but do not change the is_safe status.
267267 timeout = self .overwatcher .config ["overwatcher.alerts.idle_timeout" ] or 600
268- if self .overwaidle_since > 0 and (time () - self .overwaidle_since ) > timeout :
268+ if (
269+ self .overwatcher_idle_since > 0
270+ and (time () - self .overwatcher_idle_since ) > timeout
271+ ):
269272 await self .notify (
270273 f"Overwatcher has been idle for over { timeout :.0f} s." ,
271274 min_time_between_repeat_notifications = 300 ,
You can’t perform that action at this time.
0 commit comments