Skip to content

Commit 4dae6ad

Browse files
author
Anze
committed
Allow sensors with unspecified intervals (bots might want to handle this on their own)
1 parent ce6b006 commit 4dae6ad

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

grafoleancollector/collector.py

+3-2
Original file line numberDiff line numberDiff line change
@@ -284,8 +284,9 @@ def fetch_job_configs(self, protocol):
284284
elif sensor["default_interval"] is not None:
285285
interval = sensor["default_interval"]
286286
else:
287-
logging.warn("Interval not set, ignoring sensor {} on entity {}!".format(sensor_id, entity_id))
288-
continue
287+
# some sensors might not be periodic, or their interval might not be specified in the same way as with periodic
288+
# sensors - we allow bots to handle such cases by themselves:
289+
interval = None
289290
del sensor["default_interval"] # cleanup - nobody should need this anymore
290291

291292
sensors.append({

0 commit comments

Comments
 (0)