try except for schedule manager

This commit is contained in:
DJ2LS 2024-02-24 20:34:53 +01:00
parent 374f400f30
commit 956cede593

View file

@ -79,10 +79,13 @@ class ScheduleManager:
def check_for_queued_messages(self): def check_for_queued_messages(self):
if not self.state_manager.getARQ(): if not self.state_manager.getARQ():
if DatabaseManagerMessages(self.event_manager).get_first_queued_message(): try:
params = DatabaseManagerMessages(self.event_manager).get_first_queued_message() if first_queued_message := DatabaseManagerMessages(
command = command_message_send.SendMessageCommand(self.config_manager.read(), self.state_manager, self.event_manager, params) self.event_manager
).get_first_queued_message():
command = command_message_send.SendMessageCommand(self.config_manager.read(), self.state_manager, self.event_manager, first_queued_message)
command.transmit(self.modem) command.transmit(self.modem)
except Exception as e:
print(e)
return return