Send first alert "immediately" if critical temp status
i.e. only wait for "first email" delay if *not* critical courtesy of Cole Chaney <cole@mamajeansmarket.com>
This commit is contained in:
parent
f8f29a8551
commit
8a1551e0f5
|
@ -143,6 +143,8 @@ class TempmonServerDaemon(Daemon):
|
||||||
return
|
return
|
||||||
|
|
||||||
# delay even the first email, until configured threshold is reached
|
# delay even the first email, until configured threshold is reached
|
||||||
|
# unless we have a critical status
|
||||||
|
if status != self.enum.TEMPMON_PROBE_STATUS_CRITICAL_TEMP:
|
||||||
timeout = datetime.timedelta(minutes=probe.therm_status_timeout)
|
timeout = datetime.timedelta(minutes=probe.therm_status_timeout)
|
||||||
if (self.now - probe.status_changed) <= timeout:
|
if (self.now - probe.status_changed) <= timeout:
|
||||||
return
|
return
|
||||||
|
|
Loading…
Reference in a new issue