Skip to content

Commit

Permalink
Temporarily change some debug log entries to info to diagnose hangs i…
Browse files Browse the repository at this point in the history
…n MAVEN load_mag_byorbit test
  • Loading branch information
jameswilburlewis committed Jan 16, 2025
1 parent 1469c86 commit 67a0d1c
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions pyspedas/projects/maven/download_files_utilities.py
Original file line number Diff line number Diff line change
Expand Up @@ -126,9 +126,9 @@ def get_orbit_files():

orbit_files_url = "http://naif.jpl.nasa.gov/pub/naif/MAVEN/kernels/spk/"
pattern = r">maven_orb_rec(\.orb|.{17}\.orb)<"
logging.debug("get_orbit_files() making request to URL %s", orbit_files_url)
logging.info("get_orbit_files() making request to URL %s", orbit_files_url)
page = urllib.request.urlopen(orbit_files_url)
logging.debug("get_orbit_files() finished request to URL %s", orbit_files_url)
logging.info("get_orbit_files() finished request to URL %s", orbit_files_url)
page_string = str(page.read())
toolkit_path = CONFIG["local_data_dir"]

Expand All @@ -150,21 +150,21 @@ def get_orbit_files():

for matching_pattern in re.findall(pattern, page_string):
filename = "maven_orb_rec" + matching_pattern
logging.debug("get_orbit_files() making request to URL %s", orbit_files_url + filename)
logging.info("get_orbit_files() making request to URL %s", orbit_files_url + filename)
o_file = urllib.request.urlopen(orbit_files_url + filename)
logging.debug("get_orbit_files() finished request to URL %s", orbit_files_url + filename)
logging.info("get_orbit_files() finished request to URL %s", orbit_files_url + filename)

if is_fsspec_uri(toolkit_path):
ifn = "/".join([orbit_files_path, filename])
logging.debug("reading fsspec file %s",ifn)
logging.info("reading fsspec file %s",ifn)
fo = fs.open(ifn, "wb")
else:
ifn = os.path.join(orbit_files_path, filename)
logging.debug("reading plain file %s",ifn)
fo = open(ifn, "wb")
with fo as code:
content=o_file.read()
logging.debug("writing %d bytes into file %s",len(content), ifn)
logging.info("writing %d bytes into file %s",len(content), ifn)
code.write(content)

merge_orbit_files()
Expand Down

0 comments on commit 67a0d1c

Please sign in to comment.