Skip to content

Commit

Permalink
Moving a few items to config file.
Browse files Browse the repository at this point in the history
  • Loading branch information
lcarlaw committed Aug 26, 2024
1 parent 61e8562 commit dfdd8f9
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
6 changes: 6 additions & 0 deletions config.py
Original file line number Diff line number Diff line change
Expand Up @@ -126,3 +126,9 @@ def setup_paths_and_dirs(n_intervals, session_id):
# monitoring and/or cancelling.
scripts_list = ["Nexrad", "munger", "obs_placefile", "nse", "wgrib2",
"get_data", "process", "hodo_plot"]

# Names of surface placefiles for monitoring script
surface_placefiles = [
'wind.txt', 'temp.txt', 'latest_surface_observations.txt',
'latest_surface_observations_lg.txt', 'latest_surface_observations_xlg.txt'
]
6 changes: 1 addition & 5 deletions utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -132,11 +132,7 @@ def munger_monitor(RADAR_DIR, POLLING_DIR):
return percent_complete

def surface_placefile_monitor(PLACEFILES_DIR):
filenames = [
'wind.txt', 'temp.txt', 'latest_surface_observations.txt',
'latest_surface_observations_lg.txt', 'latest_surface_observations_xlg.txt'
]
expected_files = [f"{PLACEFILES_DIR}/{i}" for i in filenames]
expected_files = [f"{PLACEFILES_DIR}/{i}" for i in config.surface_placefiles]
files_on_system = [x for x in expected_files if os.path.exists(x)]

#percent_complete = calc_completion_percentage(expected_files, files_on_system)
Expand Down

0 comments on commit dfdd8f9

Please sign in to comment.