-
Notifications
You must be signed in to change notification settings - Fork 47
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
850 avoid search by id before every server mode download #916
850 avoid search by id before every server mode download #916
Conversation
jlahovnik
commented
Nov 8, 2023
•
edited
Loading
edited
- download info is stored in instance of EODataAccessGateway with key composed of product type, provider and id
- if download is attempted for product where id is not in download info and search by id is available for provider and product type, it will be executed; if search by id is not possible an error will be raised to do a search
Code Coverage (Ubuntu)
Minimum allowed coverage is Generated by 🐒 cobertura-action against 49974c0 |
Code Coverage (Windows)
Minimum allowed coverage is Generated by 🐒 cobertura-action against 49974c0 |
83d5e2c
to
0e981c2
Compare
updated based on input from @alambare-csgroup |
@@ -185,6 +185,7 @@ def __init__( | |||
os.path.join(self.conf_dir, "shp"), | |||
) | |||
self.set_locations_conf(locations_conf_path) | |||
self.download_info = {} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please store full SearchResult objects in a _search_results_cache
collections.dequeue() having maxlen
default to 100 (stored in a new constant) and customizable using an environment variable like EODAG_SEARCH_RESULTS_CACHE_MAXLEN
.
Please also put _search_results_cache
in rest.utils
as it should only concern server-mode downloads.
To find a matching product, loop over the cache starting with the most recent result. (check at first only provider and product type of the first product of each search result)
c771dec
to
f59180a
Compare
closed because change requests were implemented on new branch -> new PR: #1012 |