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

retain the default listeners for future unsubscribing #5781

Merged
merged 2 commits into from
Aug 17, 2023

Conversation

no-reply
Copy link
Contributor

subscribe the hyrax default listeners in batch. provide a hook for looking up
the Hyrax.publisher.default_listeners. this makes it possible to unsubscribe
individual listeners at a later time.

these instances have to live in memory for the life of the Publisher anyway, so
this shouldn't impact when they are freed for garbage collection.

@samvera/hyrax-code-reviewers


##
# @return Array[Object] the listeners Hyrax subscribes by default.
def default_listeners
Copy link
Member

Choose a reason for hiding this comment

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

How about adding a simple test since this is a public thing which shouldn't go away without red flags?
Maybe something ensuring it returns an array?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

tests are in. thanks!

cjcolvar
cjcolvar previously approved these changes Aug 29, 2022
Copy link
Member

@cjcolvar cjcolvar left a comment

Choose a reason for hiding this comment

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

Thanks!

subscribe the hyrax default listeners in batch. provide a hook for looking up
the `Hyrax.publisher.default_listeners`. this makes it possible to unsubscribe
individual listeners at a later time.

these instances have to live in memory for the life of the Publisher anyway, so
this shouldn't impact when they are freed for garbage collection.
@no-reply
Copy link
Contributor Author

this one had fallen way behind, but i just rebased it and will follow through on any issues in the tests.

@dunn dunn merged commit ff6bb7d into main Aug 17, 2023
8 checks passed
@dunn dunn deleted the retain-default-listeners branch August 17, 2023 17:27
@dlpierce dlpierce added the notes-minor Release Notes: Non-breaking features label Aug 25, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
notes-minor Release Notes: Non-breaking features
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants