Skip to content
This repository has been archived by the owner on Apr 11, 2022. It is now read-only.

Add a unique index to genres.name. #794

Merged
merged 1 commit into from
Feb 2, 2018
Merged

Add a unique index to genres.name. #794

merged 1 commit into from
Feb 2, 2018

Conversation

leonardr
Copy link
Contributor

@leonardr leonardr commented Feb 2, 2018

Just a quick branch to fix an old issue (#480).

The migration script may cause problems on servers that have multiple genres with the same name, but none of NYPL's production servers are like that, so hopefully the race condition that called attention to this problem is also gone.

@@ -8708,7 +8708,7 @@ def cautious_http_get(cls, url, headers, **kwargs):

# Sites that cause problems for us if we make automated
# HTTP requests to them while trying to find free books.
AVOID_WHEN_CAUTIOUS_DOMAINS = ['gutenberg.org']
AVOID_WHEN_CAUTIOUS_DOMAINS = ['gutenberg.org', 'books.google.com']
Copy link
Contributor Author

@leonardr leonardr Feb 2, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is an unrelated change to make sure an OPDS import from unglue.it doesn't try to download PDFs from Google Books. (It's impossible for an automated client to get a PDF out of Google Books, so no point in trying.)

@leonardr leonardr requested a review from courte February 2, 2018 17:30
@leonardr leonardr merged commit d2e0652 into master Feb 2, 2018
@leonardr leonardr removed the in review label Feb 2, 2018
@EdwinGuzman EdwinGuzman deleted the unique-genre-name branch March 19, 2021 21:21
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants