(taskid)
return jsonize({"success": True})
Set an option (command line switch) for a certain task ID
Set an option (command line switch) for a certain task ID
Set an option ( command line switch ) for a certain task ID
def option_set(taskid):
    """
    Set an option (command line switch) for a certain task ID
    """
    if taskid not in DataStore.tasks:
        logger.warning("[%s] Invalid task ID provided to option_set()" % taskid)
        return jsonize({"success": False, "message": "Invalid task ID"})

    for option, value in request.json.items():
        DataStore.tasks[taskid].set_option(option, value)

    logger.debug("[%s] Requested to set options" % taskid)
    return jsonize({"success": True})
def option_set ( taskid ) : if taskid not in DataStore . tasks : logger . warning ( "[%s] Invalid task ID provided to option_set()" % taskid ) return jsonize ( { "success" : False , "message" : "Invalid task ID" } ) for option , value in request . json . items ( ) : DataStore . tasks [ taskid ] . set_option ( option , value ) logger . debug ( "[%s] Requested to set options" % taskid ) return jsonize ( { "success" : True } )