Pypo: Redundant Pypopush happens after restart pypo service

-was clearing the queue after fetching the schedule :S
This commit is contained in:
Martin Konecny 2013-05-13 17:52:22 -04:00
parent 21a51b6287
commit f5a0d0a9a4
1 changed files with 4 additions and 4 deletions

View File

@ -528,10 +528,6 @@ class PypoFetch(Thread):
def main(self):
# Bootstrap: since we are just starting up, we need to grab the
# most recent schedule. After that we can just wait for updates.
success = self.persistent_manual_schedule_fetch(max_attempts=5)
#Make sure all Liquidsoap queues are empty. This is important in the
#case where we've just restarted the pypo scheduler, but Liquidsoap still
#is playing tracks. In this case let's just restart everything from scratch
@ -539,6 +535,10 @@ class PypoFetch(Thread):
#Liquidsoap is playing much more easily.
self.pypo_liquidsoap.clear_all_queues()
# Bootstrap: since we are just starting up, we need to grab the
# most recent schedule. After that we can just wait for updates.
success = self.persistent_manual_schedule_fetch(max_attempts=5)
if success:
self.logger.info("Bootstrap schedule received: %s", self.schedule_data)
self.set_bootstrap_variables()