Skip to content

Commit

Permalink
Merge branch '11-fix-attribute-error' into 'master'
Browse files Browse the repository at this point in the history
#11: Fix a crash that happened if SCHEDULE_TIME wasn't set

See merge request ix.ai/cioban!83
  • Loading branch information
Alex Thomae committed Mar 14, 2023
2 parents 7b642be + a3cf518 commit 710db8d
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion cioban/cioban.py
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,8 @@ def run(self):
start_http_server(self.settings['prometheus_port']) # starts the prometheus metrics server
log.info(f"Listening on port {self.settings['prometheus_port']}")
while True:
self.__set_timer()
if self.settings['schedule_time']:
self.__set_timer()
log.info(f'Sleeping for {self.sleep} {self.sleep_type}')
prometheus.PROM_STATE_ENUM.state('sleeping')
wait = getattr(pause, self.sleep_type)
Expand Down

0 comments on commit 710db8d

Please sign in to comment.