def get_queue_info(self, instance, cursor):
        """Collects metrics for all queues on the connected database."""
        cursor.execute(self.QUEUE_INFO_STATEMENT)
        for queue_name, ticker_lag, ev_per_sec in cursor:
            yield queue_name, {
                'ticker_lag': ticker_lag,
                'ev_per_sec': ev_per_sec,
            }
Collects metrics for all queues on the connected database.