Пример #1
0
def handle_post():
    batch_id = BATCHPROFILER_DEFAULTS[BATCH_ID]
    my_batch = RunBatch.BPBatch()
    my_batch.select(batch_id)
    txt_output_dir = RunBatch.text_file_directory(my_batch)
    job_script_dir = RunBatch.script_file_directory(my_batch)
    what_i_did = {}
    maybe_chmod(txt_output_dir, 0777, what_i_did)
    maybe_chmod(job_script_dir, 0777, what_i_did)
        
    for run in my_batch.select_runs():
        for path in [RunBatch.run_text_file_path(my_batch, run),
                     RunBatch.run_out_file_path(my_batch, run),
                     RunBatch.run_err_file_path(my_batch, run)]:
            maybe_chmod(path, 0644, what_i_did)
    
    print "Content-Type: application/json"
    print
    print json.dumps(what_i_did)
Пример #2
0
def handle_post():
    batch_id = BATCHPROFILER_DEFAULTS[BATCH_ID]
    my_batch = RunBatch.BPBatch()
    my_batch.select(batch_id)
    txt_output_dir = RunBatch.text_file_directory(my_batch)
    job_script_dir = RunBatch.script_file_directory(my_batch)
    what_i_did = {}
    maybe_chmod(txt_output_dir, 0777, what_i_did)
    maybe_chmod(job_script_dir, 0777, what_i_did)

    for run in my_batch.select_runs():
        for path in [
                RunBatch.run_text_file_path(my_batch, run),
                RunBatch.run_out_file_path(my_batch, run),
                RunBatch.run_err_file_path(my_batch, run)
        ]:
            maybe_chmod(path, 0644, what_i_did)

    print "Content-Type: application/json"
    print
    print json.dumps(what_i_did)