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

Add related data to hydration cache #219

Draft
wants to merge 4 commits into
base: main
Choose a base branch
from
Draft

Conversation

tpendragon
Copy link
Contributor

  • Get a test written that hydrates an EphemeraFolder.
  • Add related_data json field.
  • Start storing some amount of related_data.
  • Initial implementation done.

Copy link

github-actions bot commented Nov 7, 2024

Container Scanning Status: ✅ Success


ghcr.io/pulibrary/dpul-collections:pr-219 (debian 12.6)
=======================================================
Total: 0 (HIGH: 0, CRITICAL: 0)

@@ -58,11 +58,14 @@ defmodule DpulCollections.IndexingPipeline do
Writes or updates hydration cache entries.
"""
def write_hydration_cache_entry(attrs \\ %{}) do
attrs = Map.merge(%{related_data: %{}}, attrs)
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I added this as a default because we have tests that don't pass related_data, I don't know that it's actually real.

@@ -94,8 +96,32 @@ defmodule DpulCollections.IndexingPipeline.Figgy.HydrationConsumer do
|> Broadway.Message.put_batcher(:noop)
end

def extract_related_data(resource) do
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Part of me feels like all this code should be somewhere else, but I don't really know where. Like I'm scared it's gonna get a lot bigger, but maybe it won't?

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.

1 participant