Skip to content
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

Open
wants to merge 7 commits into
base: main
Choose a base branch
from
Open

Adding pdf posts #19

wants to merge 7 commits into from

Conversation

DevinSmithWork
Copy link
Collaborator

No description provided.

params=params,
files={'file': pdf_response.content})

if media_response.status_code > 300:

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.

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:

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?

Copy link
Collaborator Author

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
@DevinSmithWork
Copy link
Collaborator Author

@myucekul -- Code updates from this week have been pulled into this adding-pdf-posts branch:
• Added ability to resubmit metadata
• Added ability to resubmit PDFs
• Significant refactoring
• Sequestered the V1 functions wherever possible to make them easier to remove from the code when E-Link 2 goes live.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants