CC-3266: Pypo: pypopush will perfom better if it only process the
lastest msg from the rabbitMQ queue - done
This commit is contained in:
parent
863de54fc8
commit
438340ff9a
|
@ -58,8 +58,11 @@ class PypoPush(Thread):
|
||||||
def push(self, export_source):
|
def push(self, export_source):
|
||||||
logger = logging.getLogger('push')
|
logger = logging.getLogger('push')
|
||||||
|
|
||||||
|
|
||||||
# get a new schedule from pypo-fetch
|
# get a new schedule from pypo-fetch
|
||||||
if not self.queue.empty():
|
if not self.queue.empty():
|
||||||
|
# make sure we get the latest schedule
|
||||||
|
while not self.queue.empty():
|
||||||
scheduled_data = self.queue.get()
|
scheduled_data = self.queue.get()
|
||||||
logger.debug("Received data from pypo-fetch")
|
logger.debug("Received data from pypo-fetch")
|
||||||
self.schedule = scheduled_data['schedule']
|
self.schedule = scheduled_data['schedule']
|
||||||
|
|
Loading…
Reference in New Issue