Commit 08abc2d4c8cfc0a6668bff9772d6b96457990161
1 parent
46512d17
Exists in
master
and in
2 other branches
Remove duplicate NetCDFs from AMDA's API response.
Showing
2 changed files
with
5 additions
and
2 deletions
Show diff stats
CHANGELOG.md
@@ -12,8 +12,8 @@ | @@ -12,8 +12,8 @@ | ||
12 | - [x] Loader and targets loading animation | 12 | - [x] Loader and targets loading animation |
13 | - [x] Start/Stop datetime fields | 13 | - [x] Start/Stop datetime fields |
14 | - [x] Retry CSV generation when it fails due to a bug in AMDA's API | 14 | - [x] Retry CSV generation when it fails due to a bug in AMDA's API |
15 | +- [x] Remove duplicate NetCDFs from AMDA's API response | ||
15 | - [ ] Optimize CSV generation (with some vectorization using numpy) | 16 | - [ ] Optimize CSV generation (with some vectorization using numpy) |
16 | -- [ ] Remove duplicate NetCDFs from AMDA's API response | ||
17 | - [ ] Download raw data (as CSV) for current time interval and targets | 17 | - [ ] Download raw data (as CSV) for current time interval and targets |
18 | - [ ] Same via SAMP | 18 | - [ ] Same via SAMP |
19 | - [ ] Credit the author of the pixel art planets | 19 | - [ ] Credit the author of the pixel art planets |
web/run.py
@@ -219,7 +219,10 @@ def retrieve_data(orbiter, what, started_at, stopped_at): | @@ -219,7 +219,10 @@ def retrieve_data(orbiter, what, started_at, stopped_at): | ||
219 | finally: | 219 | finally: |
220 | retries += 1 | 220 | retries += 1 |
221 | if not remote_gzip_files: | 221 | if not remote_gzip_files: |
222 | - abort(400, "Failed to fetch data at '%s' : %s" % (url, errors)) | 222 | + abort(400, "Failed to fetch gzip files list for %s at '%s' : %s" % |
223 | + (orbiter, url, errors)) | ||
224 | + else: | ||
225 | + remote_gzip_files = list(set(remote_gzip_files)) | ||
223 | 226 | ||
224 | log.debug("Fetched remote gzip files list : %s." % str(remote_gzip_files)) | 227 | log.debug("Fetched remote gzip files list : %s." % str(remote_gzip_files)) |
225 | 228 |