diff --git a/services/TimedMessageService.py b/services/TimedMessageService.py index 9116f20..8d77056 100644 --- a/services/TimedMessageService.py +++ b/services/TimedMessageService.py @@ -75,6 +75,7 @@ class TimedMessageService(Service): for msg_id in self.messages: new_time = starting_time + timedelta(minutes = self.messages[msg_id]["interval"]) formatted = new_time.strftime("%H:%M") + # avoids two messages to spawn at the same time, inducing a 3 minutes delay while formatted in times: new_time += timedelta(minutes = 3) formatted = new_time.strftime("%H:%M")