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

Vendors: Retry getting Amazon data from the affiliate server #6332

Merged

Conversation

cclauss
Copy link
Contributor

@cclauss cclauss commented Mar 27, 2022

Closes #5474

The /isbn endpoint should retry a few times to see if the affiliate service has the Amazon result in the cache. If this import is already queued up, the set operation will ensure that it will be ignored automatically.

Technical

Testing

Screenshot

Stakeholders

@cdrini
Copy link
Collaborator

cdrini commented Mar 28, 2022

Can you search the history to see if we can do list | str ? I vaguely recall we couldn't for some reason... There's a PR somewhere I think. Might need Union[list, str]

@cdrini cdrini closed this Mar 28, 2022
@cclauss
Copy link
Contributor Author

cclauss commented Mar 28, 2022

@cdrini
Copy link
Collaborator

cdrini commented Mar 28, 2022

Ooops!!! No I did not meant to close it :P

@cdrini cdrini reopened this Mar 28, 2022
openlibrary/core/vendors.py Outdated Show resolved Hide resolved
@cclauss
Copy link
Contributor Author

cclauss commented Apr 7, 2022

Test this on one of the VMs like testing.

  • Type hints
  • Comments

@mekarpeles mekarpeles changed the title DRAFT: Vendors: Retry getting Amazon data from the affiliate server Vendors: Retry getting Amazon data from the affiliate server Apr 7, 2022
mekarpeles and others added 2 commits April 15, 2022 11:44
@cclauss
Copy link
Contributor Author

cclauss commented Apr 16, 2022

Ready for review.

@mekarpeles mekarpeles added the On testing.openlibrary.org This PR has been deployed to testing.openlibrary.org for testing label Apr 21, 2022
@mekarpeles mekarpeles merged commit 8f6b54a into internetarchive:master May 2, 2022
@cclauss cclauss deleted the amazon_retry_before_submit branch May 2, 2022 17:23
@jimchamp jimchamp removed the On testing.openlibrary.org This PR has been deployed to testing.openlibrary.org for testing label Apr 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Fix /isbn to retry Affiliate API up to 3 times (w/ 1 sec timeout)
4 participants