Commenting an obscure loop in the Timed Message service
parent
484e042e17
commit
f2dee18079
|
@ -75,6 +75,7 @@ class TimedMessageService(Service):
|
||||||
for msg_id in self.messages:
|
for msg_id in self.messages:
|
||||||
new_time = starting_time + timedelta(minutes = self.messages[msg_id]["interval"])
|
new_time = starting_time + timedelta(minutes = self.messages[msg_id]["interval"])
|
||||||
formatted = new_time.strftime("%H:%M")
|
formatted = new_time.strftime("%H:%M")
|
||||||
|
# avoids two messages to spawn at the same time, inducing a 3 minutes delay
|
||||||
while formatted in times:
|
while formatted in times:
|
||||||
new_time += timedelta(minutes = 3)
|
new_time += timedelta(minutes = 3)
|
||||||
formatted = new_time.strftime("%H:%M")
|
formatted = new_time.strftime("%H:%M")
|
||||||
|
|
Loading…
Reference in New Issue