def handle_results_print(srv, run_id, accum): ''' example of results handling, note the data types are converted from json to python types. just prints the results, and paremeters, but could easily save to a database also/instead ''' tag = getTag(accum) data = {} # data['accum'] = accum if os.path.exists(local_results_file_path_F(tag)): with open(local_results_file_path_F(tag), 'rb') as f: #results = pickle.load(f) results = json.load(f) else: results = 'N/A' data['remote_results'] = results print print_accum(data) print
def fetch_and_teardown(srv, run_id, accum): ''' fetch logs and results file from remote overwriting any existing files ''' root = getRoot(accum) tag = getTag(accum) sync_with_remote(srv, local_results_dir_F(tag), remote_results_dir_F(root)) sync_with_remote(srv, local_log_dir_F(tag), remote_logs_dir_F(root)) remove_remote_location(srv, root)