Skip to content

feat: add on cache write hook - #1053

Open
jfrain99 wants to merge 1 commit into
edgefrom
feat/on-cache-write-hook
Open

feat: add on cache write hook#1053
jfrain99 wants to merge 1 commit into
edgefrom
feat/on-cache-write-hook

Conversation

@jfrain99

Copy link
Copy Markdown
Collaborator

No description provided.

@speeddragon speeddragon left a comment

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.

Looks good. Just gave minor details regarding the changes.

end.

%% @doc Raw binary writes trigger the `cache-write' hook.
cache_write_binary_hook_test() ->

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.

I think this test can be parallel? We need to add _parallel. AI agents don't do that by default because of the warnings about the function not being used.

erlang:raise(Type, Reason, Stacktrace)
end;
end,
hb_hook:on(<<"cache-write">>, #{ <<"body">> => Msg }, Opts),

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.

Should we include this inside the try/catch? Currently, do_write_message doesn't provide feedback based on {ok, _} or {error, _}, so this should be ok.

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.

2 participants