(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
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
        """
        pq = join(self._path, 'entries')
        pt = join(self._path, 'taken')
        zk = raw_client()
        if queued:
            try:
                entries = zk.exists(pq).numChildren
            except AttributeError:
                return 0
            if taken:
                return entries
            else:
                taken = zk.exists(pt).numChildren
                return entries - taken
        else:
            if taken:
                try:
                    return zk.exists(pt).numChildren
                except AttributeError:
                    return 0
            else:
                raise AttributeError(
                    "You asked for an impossible situation.  Queue items are"
                    " waiting for a lock xor taken."
                    "  You cannot have queue entries"
                    " that are both not locked and not waiting.")
def size ( self , queued = True , taken = True ) : pq = join ( self . _path , 'entries' ) pt = join ( self . _path , 'taken' ) zk = raw_client ( ) if queued : try : entries = zk . exists ( pq ) . numChildren except AttributeError : return 0 if taken : return entries else : taken = zk . exists ( pt ) . numChildren return entries - taken else : if taken : try : return zk . exists ( pt ) . numChildren except AttributeError : return 0 else : raise AttributeError ( "You asked for an impossible situation.  Queue items are" " waiting for a lock xor taken." "  You cannot have queue entries" " that are both not locked and not waiting." )