queue.py
def pop(self, timeout=0):
        """
        Pop a request
        timeout not support in this queue class
        """
        # use atomic range/remove using multi/exec
        # pipe = self.server.pipeline()
        # pipe.multi()
        # pipe.zrange(self.key, 0, 0).zremrangebyrank(self.key, 0, 0)
        # results, count = pipe.execute()
        # results = self.server[self.collection].find({'score': 0})
        # if results.count():
        #     result = self._decode_request(results[0]['_id'])
        #     count = self.server[self.collection].delete_many({'score': 0})
        #     return result
        result = self.server[self.collection].find_one_and_delete({}, sort=[('score', 1)])
        if result:
            return self._decode_request(result['_id'])

        Pop a request
        timeout not support in this queue class
        
Pop a request
timeout not support in this queue class
Pop a request timeout not support in this queue class
def pop(self, timeout=0):
        result = self.server[self.collection].find_one_and_delete({}, sort=[('score', 1)])
        if result:
            return self._decode_request(result['_id'])
def pop ( self , timeout = 0 ) : result = self . server [ self . collection ] . find_one_and_delete ( { } , sort = [ ( 'score' , 1 ) ] ) if result : return self . _decode_request ( result [ '_id' ] )
Pop a request
timeout not support in this queue class
Pop a request timeout not support in this queue class
"""
        Pop a request
        timeout not support in this queue class
        """ # use atomic range/remove using multi/exec # pipe = self.server.pipeline() # pipe.multi() # pipe.zrange(self.key, 0, 0).zremrangebyrank(self.key, 0, 0) # results, count = pipe.execute() # results = self.server[self.collection].find({'score': 0}) # if results.count(): #     result = self._decode_request(results[0]['_id']) #     count = self.server[self.collection].delete_many({'score': 0}) #     return result
self
timeout