Skip to content

Commit

Permalink
remove break, test a few more
Browse files Browse the repository at this point in the history
  • Loading branch information
scottstanie committed Dec 29, 2021
1 parent 098b7b6 commit e043574
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions eof/scihubclient.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,8 +61,10 @@ def query_orbit(self, t0, t1, satellite_id: str, product_type: str = "AUX_POEORB
query_params = dict(
producttype=product_type,
platformserialidentifier=satellite_id[1:],
# this has weird endpoint inclusion
# https://github.com/sentinelsat/sentinelsat/issues/551#issuecomment-992344180
# date=[t0, t1],
# use the following instead
beginposition=(None, t1),
endposition=(t0, None),
)
Expand Down Expand Up @@ -205,8 +207,6 @@ def get_full_eof_list(self, orbit_type="precise", max_dt=None):
if orbit_type not in self.urls.keys():
raise ValueError(f"Unknown orbit type: {orbit_type}")

breakpoint()
# TODO: Cache the list of EOFs if searched already?
if self.eof_lists.get(orbit_type) is not None:
return self.eof_lists[orbit_type]
# Try to see if we have the list of EOFs in the cache
Expand All @@ -215,7 +215,8 @@ def get_full_eof_list(self, orbit_type="precise", max_dt=None):
# Need to clear it if it's older than what we're looking for
max_saved = max([e.start_time for e in eof_list])
if max_saved < max_dt:
logger.warning(f"Clearing cached EOF list, {max_saved} is older than requested {max_dt}")
logger.warning(f"Clearing cached {orbit_type} EOF list:")
logger.warning(f"{max_saved} is older than requested {max_dt}")
self._clear_cache(orbit_type)
else:
logger.info("Using cached EOF list")
Expand Down

0 comments on commit e043574

Please sign in to comment.