(self, timeout=0)
Pop a request
Pop a request
Pop a request
def pop(self, timeout=0):
        """Pop a request"""
        if timeout > 0:
            data = self.server.brpop(self.key, timeout)
            if isinstance(data, tuple):
                data = data[1]
        else:
            data = self.server.rpop(self.key)
        if data:
            return self._decode_request(data)
def pop ( self , timeout = 0 ) : if timeout > 0 : data = self . server . brpop ( self . key , timeout ) if isinstance ( data , tuple ) : data = data [ 1 ] else : data = self . server . rpop ( self . key ) if data : return self . _decode_request ( data )