'Delete all current messages in a queue.'

def _purge(self, queue):

    q = self._new_queue(queue)
    n = 0
    l = q.pop(10)
    while l[u'items']:
        for m in l[u'items']:
            self.delete_message(queue, m[u'id'])
            n += 1
        l = q.pop(10)
    return n
