Skip to content

Commit

Permalink
Allow sensors with unspecified intervals (bots might want to handle t…
Browse files Browse the repository at this point in the history
…his on their own)
  • Loading branch information
Anze committed Feb 11, 2020
1 parent ce6b006 commit 4dae6ad
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions grafoleancollector/collector.py
Original file line number Diff line number Diff line change
Expand Up @@ -284,8 +284,9 @@ def fetch_job_configs(self, protocol):
elif sensor["default_interval"] is not None:
interval = sensor["default_interval"]
else:
logging.warn("Interval not set, ignoring sensor {} on entity {}!".format(sensor_id, entity_id))
continue
# some sensors might not be periodic, or their interval might not be specified in the same way as with periodic
# sensors - we allow bots to handle such cases by themselves:
interval = None
del sensor["default_interval"] # cleanup - nobody should need this anymore

sensors.append({
Expand Down

0 comments on commit 4dae6ad

Please sign in to comment.