(self, queued=True, taken=True)
Find the number of jobs in the queue

        `queued` - Include the entries in the queue that are not currently
            being processed or otherwise locked
        `taken` - Include the entries in the queue that are currently being
            processed or are otherwise locked

        Raise AttributeError if all kwargs are False
Find the number of jobs in the queue
Find the number of jobs in the queue
def size(self, queued=True, taken=True):
        """
        Find the number of jobs in the queue

        `queued` - Include the entries in the queue that are not currently
            being processed or otherwise locked
        `taken` - Include the entries in the queue that are currently being
            processed or are otherwise locked

        Raise AttributeError if all kwargs are False
        """
        if not queued and not taken:
            raise AttributeError("either `taken` or `queued` must be True")

        if taken and queued:

            n_queued_and_taken, _ = raw_client().evalsha(
                self._SHAS['lq_qsize_fast'],
                len(self.SCRIPTS['lq_qsize_fast']['keys']),
                self._path, self._q_lookup)
            return n_queued_and_taken
        else:
            nqueued, ntaken, _ = raw_client().evalsha(
                self._SHAS['lq_qsize_slow'],
                len(self.SCRIPTS['lq_qsize_slow']['keys']),
                self._path, self._q_lookup)
            if queued:
                return nqueued
            elif taken:
                return ntaken
            else:
                raise Exception('code error - should never get here')
def size ( self , queued = True , taken = True ) : if not queued and not taken : raise AttributeError ( "either `taken` or `queued` must be True" ) if taken and queued : n_queued_and_taken , _ = raw_client ( ) . evalsha ( self . _SHAS [ 'lq_qsize_fast' ] , len ( self . SCRIPTS [ 'lq_qsize_fast' ] [ 'keys' ] ) , self . _path , self . _q_lookup ) return n_queued_and_taken else : nqueued , ntaken , _ = raw_client ( ) . evalsha ( self . _SHAS [ 'lq_qsize_slow' ] , len ( self . SCRIPTS [ 'lq_qsize_slow' ] [ 'keys' ] ) , self . _path , self . _q_lookup ) if queued : return nqueued elif taken : return ntaken else : raise Exception ( 'code error - should never get here' )