-
Notifications
You must be signed in to change notification settings - Fork 0
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
Some tiny fixes for ME scripts #361
Conversation
KateSakharova
commented
Jun 6, 2024
•
edited
Loading
edited
- Add check for missing records in DB (by some reason?)
- Add retries for add_analysis function in case of error 500
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 looks good to me :)
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.
Thanks @KateSakharova
Left one little question where I don't quite understand the flow but happy to merge anyway
else: | ||
logging.info( | ||
f"Metadata is correct but {annotation_job} is missing in DB. Adding." | ||
) | ||
annotation_job.mgx_accession = registry_id | ||
annotation_job.last_mgx_indexed = ( | ||
timezone.now() + timedelta(minutes=1) | ||
) |
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 can't quite get my head around when this would/should happen – Perhaps if we needed to restore our DB from a snapshot backup or something? Or if we ran the script from two disconnected EMG environments?
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 think that might happen when I tested ENA PROD API and added record there via CURL post. DB left without update ( ideally I should remove that record and do with emgapi again).
But !
To be honest, I did that only with 2 assemblies but that piece of code was launched more than 2 times during AtlantECO population. So the proper answer hasn't come to my head yet ...
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.
Ah yeh - that makes sense. Thanks!