-
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
Adding pdf posts #19
base: main
Are you sure you want to change the base?
Adding pdf posts #19
Conversation
submit_pubs_v2.py
Outdated
params=params, | ||
files={'file': pdf_response.content}) | ||
|
||
if media_response.status_code > 300: |
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.
We should save the response code in DB in case of failure too.
submit_pubs_v2.py
Outdated
osti_pub['response_success'] = True | ||
osti_pub['osti_id'] = osti_pub['response_json']['osti_id'] | ||
|
||
# If metadata submission was successful, submit the PDF | ||
media_response = submit_media(osti_creds, osti_pub) | ||
if media_response is False: |
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.
How would the failed media submissions be retried?
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.
We have a few options -- can discuss at 1:1
* Added eschol db logging fields needed for resubmission checking. * Added working update .sql files * Datetime formatting aligned btw MSSQL and MYSQL * Refactoring creds to env; splitting out metadata and pdf updates * Various metadata cleanups; program restructuring continues * Separated v1 in the main run function * General code cleanup * Revisions for using media_id instead of media_file_id for PDF resubmission
@myucekul -- Code updates from this week have been pulled into this adding-pdf-posts branch: |
No description provided.