-
Notifications
You must be signed in to change notification settings - Fork 0
L0 ingest issues (both shiny and repro V) #252
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
Conversation
db.insert(arch_info, 'archfiles') | ||
count_inserted += 1 | ||
db.commit() | ||
db.commit() |
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.
It is less efficient here to commit after each insert, but the "move_archive_files" routine needs a lock on the db and it can't do that if there are uncommited inserts.
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.
Superficial review, but if your testing is good then this is fine.
mica/archive/aca_l0.py
Outdated
@@ -739,7 +737,7 @@ def _fetch_individual_files(self, files): | |||
fetched_files = [] | |||
ingest_dates = [] | |||
# get the files, store in file archive, and record in database | |||
for file in files: | |||
for i, file in enumerate(files): |
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.
I don't see a dependence on the new i
.
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.
Good point. I can cut that. I was using it for extra debugging when troubleshooting.
Description
Fix some L0 ingest hiccups.
The ingest code was failing to ingest single new files in Repro. It looks like that was due to a bug in identifying new files that had been downloaded. I also hit a db locking issue that was improved by reorganizing. And while at it, I updated the pieces needed to make a new archive (of the list of files released.. the "cda" h5 piece) to work more happily with shiny (removed six, updated some urllib pieces). I was not rigorous distinguishing reproV from shiny updates here as I have just been working in shiny.
Testing