CC-2846: On crash recovery, Pypo pushes playlists up to 5 times to Liquidsoap.

-fixed
This commit is contained in:
martin 2011-09-20 12:44:48 -04:00
parent c0b5ef2635
commit 3601f37904
1 changed files with 2 additions and 1 deletions

View File

@ -126,12 +126,13 @@ class PypoPush(Thread):
try:
playlist = playlists[pkey]
plstart = schedule[pkey]['start'][0:19]
#strptime returns struct_time in local time
#mktime takes a time_struct and returns a floating point
#gmtime Convert a time expressed in seconds since the epoch to a struct_time in UTC
#mktime: expresses the time in local time, not UTC. It returns a floating point number, for compatibility with time().
epoch_start = calendar.timegm(time.gmtime(time.mktime(time.strptime(pkey, '%Y-%m-%d-%H-%M-%S'))))
epoch_start = calendar.timegm(time.gmtime(time.mktime(time.strptime(plstart, '%Y-%m-%d-%H-%M-%S'))))
#Return the time as a floating point number expressed in seconds since the epoch, in UTC.
epoch_now = time.time()