Commit b7771b86 authored by fred's avatar fred

stamina: log playlist computation time

parent 3fe25f31
......@@ -38,6 +38,7 @@ class Command(BaseCommand):
except AttributeError:
jingles = []
t0 = datetime.datetime.now()
while current_datetime < end_datetime and adjustment_counter < 5:
if (current_datetime - start_datetime) > max_duration and (
(end_datetime - current_datetime) > max_duration_leftover):
......@@ -83,7 +84,7 @@ class Command(BaseCommand):
current_datetime = start_datetime + sum(
[x.duration for x in playlist], datetime.timedelta(seconds=0))
print('computed playlist:')
print('computed playlist: (computation time: %ss)' % (datetime.datetime.now() - t0))
current_datetime = start_datetime
for track in playlist:
print(' ', current_datetime, track.duration, track.title)
......
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