def dequeue(request): if request.method != 'POST': raise TypeError("Must be a POST request") status = QueueItemManager.dequeue() return HttpResponse(dumps({'status': status}), mimetype="application/json")
def get_queue(request): return HttpResponse(dumps(list(QueueItemManager.get_active_urls())), mimetype="application/json")