(taskid)
return jsonize({"success": True})
Flush task spool (delete all tasks)
Flush task spool (delete all tasks)
Flush task spool ( delete all tasks )
def task_flush(taskid):
    """
    Flush task spool (delete all tasks)
    """
    if is_admin(taskid):
        DataStore.tasks = dict()
    else:
        for key in list(DataStore.tasks):
            if DataStore.tasks[key].remote_addr == request.remote_addr:
                del DataStore.tasks[key]

    logger.debug("[%s] Flushed task pool (%s)" % (taskid, "admin" if is_admin(taskid) else request.remote_addr))
    return jsonize({"success": True})
def task_flush ( taskid ) : if is_admin ( taskid ) : DataStore . tasks = dict ( ) else : for key in list ( DataStore . tasks ) : if DataStore . tasks [ key ] . remote_addr == request . remote_addr : del DataStore . tasks [ key ] logger . debug ( "[%s] Flushed task pool (%s)" % ( taskid , "admin" if is_admin ( taskid ) else request . remote_addr ) ) return jsonize ( { "success" : True } )