Commit df8a87f9 authored by fred's avatar fred

include timestamp in print()

parent 425d73ba
......@@ -202,8 +202,8 @@ class Command(BaseCommand):
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)
......@@ -212,7 +212,7 @@ class Command(BaseCommand):
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')
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment