Skip to content

make BookPageListsPartial async#12272

Merged
RayBB merged 3 commits intointernetarchive:masterfrom
Sanket17052006:async-BPListspartial-12270
Apr 2, 2026
Merged

make BookPageListsPartial async#12272
RayBB merged 3 commits intointernetarchive:masterfrom
Sanket17052006:async-BPListspartial-12270

Conversation

@Sanket17052006
Copy link
Copy Markdown
Contributor

Closes #12270

Changes :

  • Converted get_lists to get_lists_async
  • Added sync wrapper get_lists = async_bridge.wrap(get_lists_async)
  • Add generate_async() to BookPageListsPartial which calls await get_lists_async()

Technical

Testing

  • docker compose run --rm home make test
  • docker compose run --rm home make lint

Screenshot

N/A

Stakeholders

@RayBB

Copy link
Copy Markdown
Collaborator

@RayBB RayBB left a comment

Choose a reason for hiding this comment

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

Looks like it's on the right track. Just one small fix and then I will test it later.


# Do checks and render
lists = get_lists(keys)
lists = await get_lists_async(keys)
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Please make this public using the same public method but dropping the function name. You can see examples of this in some of the other pull requests for the main issue.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Thanks for the quick review, I updated my changes.

@Sanket17052006 Sanket17052006 force-pushed the async-BPListspartial-12270 branch from bcadd44 to eb10995 Compare April 2, 2026 22:11
@RayBB RayBB self-assigned this Apr 2, 2026
@github-project-automation github-project-automation Bot moved this to Waiting Review/Merge from Staff in Ray's Project Apr 2, 2026
Copy link
Copy Markdown
Collaborator

@RayBB RayBB left a comment

Choose a reason for hiding this comment

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

Nice job with this one.

After some investigation, turns out we don't need the public version at all because it isn't used in any templates! I looked very closely for this and deployed to testing to verify it's working as expected. (the BPL partial is working on edition pages like https://testing.openlibrary.org/books/OL22829346M/Software. )

Keep up the good work 👍

@RayBB RayBB merged commit bd785d7 into internetarchive:master Apr 2, 2026
3 checks passed
@github-project-automation github-project-automation Bot moved this from Waiting Review/Merge from Staff to Done in Ray's Project Apr 2, 2026
Chisomnwa pushed a commit to Chisomnwa/openlibrary that referenced this pull request Apr 3, 2026
Co-authored-by: RayBB <RayBB@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

🟢 /partials/BPListsSection.json

2 participants