Ejemplo n.º 1
0
def ajax_delete_task():
    # delete task based on task_name
    task_name = request.args.get('task_name','') # must
    user = request.args.get('user', '')
    print task_name, user
    if task_name and user:
        _id = user + "-" + task_name
        es.delete(index=index_manage_sensing_task, doc_type=task_doc_type, id=_id)
        try:
            delete_es(_id)
        except Exception, r:
            print Exception, r
        return json.dumps(['1'])
Ejemplo n.º 2
0
def ajax_delete_task():
    # delete task based on task_name
    task_name = request.args.get('task_name', '')  # must
    user = request.args.get('user', '')
    print task_name, user
    if task_name and user:
        _id = user + "-" + task_name
        es.delete(index=index_manage_sensing_task,
                  doc_type=task_doc_type,
                  id=_id)
        try:
            delete_es(_id)
        except Exception, r:
            print Exception, r
        return json.dumps(['1'])
def delete_group_results(task_name, submit_user):
    task_id = submit_user + task_name
    try:
        result = es.delete(index=index_name, doc_type=index_type, id=task_id)
    except:
        return False
    return True
Ejemplo n.º 4
0
def delete_group_results(task_name, submit_user):
    task_id = submit_user + task_name
    try:
        result = es.delete(index=index_name, doc_type=index_type, id=task_id)
    except:
        return False
    return True