@web.authenticated
    @gen.coroutine
    def get(self):
        app = self.application
        capp = app.capp

        try:
            broker = Broker(capp.connection().as_uri(include_password=True),
                            http_api=app.options.broker_api)
        except __HOLE__:
            self.write({})
            return

        queue_names = ControlHandler.get_active_queue_names()
        queues = yield broker.queues(queue_names)

        data = defaultdict(int)
        for queue in queues:
            data[queue['name']] = queue.get('messages', 0)

        self.write(data)
dataset/ETHPy150Open mher/flower/flower/views/monitor.py/BrokerMonitor.get