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,9 +143,11 @@ 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
|
||||||
timeout = datetime.timedelta(minutes=probe.therm_status_timeout)
|
# unless we have a critical status
|
||||||
if (self.now - probe.status_changed) <= timeout:
|
if status != self.enum.TEMPMON_PROBE_STATUS_CRITICAL_TEMP:
|
||||||
return
|
timeout = datetime.timedelta(minutes=probe.therm_status_timeout)
|
||||||
|
if (self.now - probe.status_changed) <= timeout:
|
||||||
|
return
|
||||||
|
|
||||||
msgtypes = {
|
msgtypes = {
|
||||||
self.enum.TEMPMON_PROBE_STATUS_LOW_TEMP : 'tempmon_low_temp',
|
self.enum.TEMPMON_PROBE_STATUS_LOW_TEMP : 'tempmon_low_temp',
|
||||||
|
|
Loading…
Reference in a new issue