Get the queue's number of tasks in each state.

        Returns dict with queue size for the QUEUED, SCHEDULED, and ACTIVE
        states. Does not include size of error queue.

def get_queue_sizes(self, queue):
        """
        Get the queue's number of tasks in each state.

        Returns dict with queue size for the QUEUED, SCHEDULED, and ACTIVE
        states. Does not include size of error queue.
        """

        states = [QUEUED, SCHEDULED, ACTIVE]
        pipeline = self.connection.pipeline()
        for state in states:
            pipeline.zcard(self._key(state, queue))
        results = pipeline.execute()
        return dict(zip(states, results))