self.slot.end_datetime = diffusion.datetime
async def recompute_slots_loop(self):
- print('recompute_slots_loop')
now = datetime.datetime.now()
+ print(now, 'recompute_slots_loop')
sleep = (60 - now.second) % 10 # adjust to awake at :00
while not self.quit:
await asyncio.sleep(sleep)
self.recompute_slots()
expected_slot = self.slot
if current_slot != expected_slot:
- print('unexpected change', current_slot, 'vs', expected_slot)
+ print(now, 'unexpected change', current_slot, 'vs', expected_slot)
if isinstance(current_slot, Nonstop) and not isinstance(expected_slot, Nonstop):
# interrupt nonstop
print('interrupting nonstop')