CC-5123:
Pypo: Redundant Pypopush happens after restart pypo service -was clearing the queue after fetching the schedule :S
This commit is contained in:
parent
21a51b6287
commit
f5a0d0a9a4
|
@ -528,10 +528,6 @@ class PypoFetch(Thread):
|
||||||
|
|
||||||
|
|
||||||
def main(self):
|
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
|
#Make sure all Liquidsoap queues are empty. This is important in the
|
||||||
#case where we've just restarted the pypo scheduler, but Liquidsoap still
|
#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
|
#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.
|
#Liquidsoap is playing much more easily.
|
||||||
self.pypo_liquidsoap.clear_all_queues()
|
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:
|
if success:
|
||||||
self.logger.info("Bootstrap schedule received: %s", self.schedule_data)
|
self.logger.info("Bootstrap schedule received: %s", self.schedule_data)
|
||||||
self.set_bootstrap_variables()
|
self.set_bootstrap_variables()
|
||||||
|
|
Loading…
Reference in New Issue