diff options
author | Hui Lan <lanhui@zjnu.edu.cn> | 2024-08-07 15:13:14 +0800 |
---|---|---|
committer | Hui Lan <lanhui@zjnu.edu.cn> | 2024-08-07 15:13:14 +0800 |
commit | 1c4b5c0208bd8335b685e594b146605e4453722e (patch) | |
tree | 873f77dd353ea57fe378c6b5b5f797835a9aa2cd /Code/local_network.py | |
parent | cec522c7c60771fd6da011e3e6eecb2ac607744b (diff) |
[update_network.py] Rename FILE_TIMESTAMP to TIMESTAMP_FILE
Diffstat (limited to 'Code/local_network.py')
-rw-r--r-- | Code/local_network.py | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/Code/local_network.py b/Code/local_network.py index e05e7a0..6ac38d5 100644 --- a/Code/local_network.py +++ b/Code/local_network.py @@ -32,7 +32,7 @@ from datetime import datetime from param4net import make_global_param_dict, get_key_value from log import write_log_file from utils import make_paths - +from configure import TIMESTAMP_FILE FORCE_MAKE_EDGES = 'NO' CODE_DIR = os.getcwd() # Get current working directory. It is important that you execute this script under it directory. @@ -40,7 +40,6 @@ CODE_DIR = os.getcwd() # Get current working directory. It is importa # DON'T CHANGE THE FOLLOWING PATHS AND NAMES HISTORY_DIR = '../Data/history/edges/many_targets' # each edge file contains edges for many targets HISTORY_DIR2 = '../Data/history/edges/one_target' # edges.txt.* files are here, all edge files have the name edges.txt.*, the leading string 'edges.txt' must be present. -FILE_TIMESTAMP = '../Data/log/file_timestamp.txt' SAMPLE_SIZE_FILE = '../Data/log/total.samples.txt' # each line contains a date and the number of samples on and after that date TEMP_DIR = '../Data/temp' @@ -143,7 +142,7 @@ def all_files_present(lst): return missing_file_lst def record_file_time(lst): - f = open(FILE_TIMESTAMP, 'w') + f = open(TIMESTAMP_FILE, 'w') s = '' for x in lst: if os.path.exists(x): @@ -1031,11 +1030,11 @@ if os.path.exists(BINDING_FILE): os.system(cmd) # if the file timestamp does not exist, create one -if not os.path.exists(FILE_TIMESTAMP): +if not os.path.exists(TIMESTAMP_FILE): record_file_time(FILE_LIST_TO_CHECK) # get update time of must-have files -timestamp_dict = read_file_timestamp(FILE_TIMESTAMP) +timestamp_dict = read_file_timestamp(TIMESTAMP_FILE) # update edges.txt, a merged file from several sources, HISTORY_DIR and HISTORY_DIR2. edge_file_lst = [] # collect edge files. |