Merge branch '1.9.1' into devel
Conflicts: python_apps/pypo/pypopush.py
This commit is contained in:
commit
3a2eaecad8
7 changed files with 29 additions and 15 deletions
|
@ -437,10 +437,6 @@ class PypoFetch(Thread):
|
|||
def main(self):
|
||||
logger = logging.getLogger('fetch')
|
||||
|
||||
while not self.init_rabbit_mq():
|
||||
logger.error("Error connecting to RabbitMQ Server. Trying again in few seconds")
|
||||
time.sleep(5)
|
||||
|
||||
try: os.mkdir(self.cache_dir)
|
||||
except Exception, e: pass
|
||||
|
||||
|
@ -452,6 +448,11 @@ class PypoFetch(Thread):
|
|||
self.process_schedule(self.schedule_data, "scheduler", True)
|
||||
logger.info("Bootstrap complete: got initial copy of the schedule")
|
||||
|
||||
|
||||
while not self.init_rabbit_mq():
|
||||
logger.error("Error connecting to RabbitMQ Server. Trying again in few seconds")
|
||||
time.sleep(5)
|
||||
|
||||
loops = 1
|
||||
while True:
|
||||
logger.info("Loop #%s", loops)
|
||||
|
|
|
@ -101,13 +101,15 @@ 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.strptime(pkey, '%Y-%m-%d-%H-%M-%S'))
|
||||
|
||||
epoch_start = calendar.timegm(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()
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue