Beispiel #1
0
def kaylee_process_task(request, node_id):
    if request.method == 'GET':
        return json_response(kl.get_action(node_id))
    else:
        next_task = kl.accept_result(node_id, request.data)
        # the reason for using request.data instead of request.json
        # is that Kaylee expects the "raw", non-processed data
        return json_response(next_task)
Beispiel #2
0
def actions(request, node_id):
    if request.method == 'GET':
        return json_response( kl.get_action(node_id) )
    elif request.method == 'POST':
        next_task = kl.accept_result(node_id, request.raw_post_data)
        return json_response(next_task)