[bugfix] compared timedelta with int
This commit is contained in:
		
							parent
							
								
									56351ee700
								
							
						
					
					
						commit
						6fc1e073c0
					
				@ -8,7 +8,7 @@ channel_names: ["Temperature (°)", "230V/12V Status (V)", "Router/Charger State
 | 
			
		||||
stations_blacklist: ["TEST", "EREA"]
 | 
			
		||||
networks_blacklist: []
 | 
			
		||||
interval: 60               # Perform checks every x seconds
 | 
			
		||||
n_track: 120               # wait n FAIL intervals before performing an action (i.e. send mail + end highlight status)
 | 
			
		||||
n_track: 120               # wait n_track * intervals before performing an action (i.e. send mail/end highlight status)
 | 
			
		||||
timespan: 7                # Check data of the recent x days
 | 
			
		||||
verbosity: 0
 | 
			
		||||
track_changes: True        # tracks all changes since GUI startup by text highlighting (GUI only)
 | 
			
		||||
@ -48,7 +48,7 @@ THRESHOLDS:
 | 
			
		||||
# nw (e.g. 1Y), st (e.g. GR01A), nwst_id (e.g. 1Y.GR01A)
 | 
			
		||||
# optional!
 | 
			
		||||
add_links:
 | 
			
		||||
  slmon: {"URL": "{nw}_{st}.html", "text": "show"}   # for example: slmon: {"URL": "{nw}_{st}.html", "text": "link"}
 | 
			
		||||
  slmon: {"URL": "{nw}_{st}.html", "text": "show"}  # for example: slmon: {"URL": "path/{nw}_{st}.html", "text": "link"}
 | 
			
		||||
 | 
			
		||||
# E-mail notifications (optional)
 | 
			
		||||
EMAIL:
 | 
			
		||||
 | 
			
		||||
@ -637,7 +637,7 @@ class StationQC(object):
 | 
			
		||||
    def check_for_inactive_message(self, key, dt_active):
 | 
			
		||||
        dt_action = self.get_dt_for_action()
 | 
			
		||||
        interval = self.parameters.get('interval')
 | 
			
		||||
        if dt_action <= dt_active < dt_action + interval:
 | 
			
		||||
        if dt_action <= dt_active < dt_action + timedelta(seconds=interval):
 | 
			
		||||
            self.send_mail(key, status_type='Inactive')
 | 
			
		||||
 | 
			
		||||
    def start(self):
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user