Skip to content

Commit

Permalink
Better response message when BTU daemon cannot be reached.
Browse files Browse the repository at this point in the history
  • Loading branch information
brian-pond committed Mar 16, 2022
1 parent 01a7771 commit 25e92df
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions btu/btu_core/doctype/btu_task_schedule/btu_task_schedule.py
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,8 @@ def resubmit_task_schedule(self, autosave=False):
Send a request to the BTU Scheduler background daemon to reload this Task Schedule in RQ.
"""
response = SchedulerAPI.reload_task_schedule(task_schedule_id=self.name)
if not response:
raise ConnectionError("Error, no response from BTU Task Scheduler daemon. Check logs in directory '/etc/btu_scheduler.logs'")
if response.startswith('Exception while connecting'):
raise ConnectionError(response)
print(f"Response from BTU Scheduler: {response}")
Expand Down

0 comments on commit 25e92df

Please sign in to comment.