-
Notifications
You must be signed in to change notification settings - Fork 0
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
base: main
Are you sure you want to change the base?
Conversation
tpendragon
commented
Nov 7, 2024
- Get a test written that hydrates an EphemeraFolder.
- Add related_data json field.
- Start storing some amount of related_data.
- Initial implementation done.
Some function moving-around would probably be good.
Container Scanning Status: ✅ Success
|
@@ -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) |
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
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?