Esempio n. 1
0
    def run(self):
        self.celery_queue = self.get_celery_queue()
        if self.celery_queue:
            self.celery_queue.start()

        try:
            while not self._running.is_set():
                with librato.new_queue() as queue:
                    for container in self.docker.containers():
                        self.do_container(self.docker.inspect_container(container['Id']), queue)
                time.sleep(1)
        except Exception as ex:
            logger.exception(str(ex))
Esempio n. 2
0
 def on_shutter(self, state):
     with librato.new_queue() as queue:
         self.process(queue)
         self.process_redis(queue)