Пример #1
0
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")
Пример #2
0
def get_queue(request):
    return HttpResponse(dumps(list(QueueItemManager.get_active_urls())),
                        mimetype="application/json")