Exemple #1
0
def dump_run(request, dump_id):
    dump = models.LinkDump.objects.get(id = dump_id)
    
    if dump.rerun_of:
        data = dump.rerun_of.dump
    else:
        data = dump.dump
    data = pickle.loads(data.encode('ascii'))
    
    new = models.LinkDump()
    
    if dump.rerun_of:
        new.rerun_of = dump.rerun_of
    else:
        new.rerun_of = dump
    new.link = dump.link
    
    res = runcode.apply_async((new.link.dst.id,), kwargs={'follow_links':False, 'locals_dict':data})
    new.result_id = res.id
    new.save()
    
    return redirect('/node/%d/edit'%(new.link.dst.id))
Exemple #2
0
def index(request, locals_dict={}):
    res = runcode.apply_async((1,))
    return HttpResponse("lol %s"%res.id)
Exemple #3
0
def noderun(request, node_id=1):
    node = models.Node.objects.get(id=node_id)
    res = runcode.apply_async([node_id])
    return HttpResponse("lol")