def dump(self, fobj):
        """Destructively dump the contents of the queue into fp."""
        next = self.redis.rpop(self.key)
        while next:
            fobj.write(next)
            next = self.redis.rpop(self.key)
Destructively dump the contents of the queue into fp.
docker_registry/lib/rqueue.py