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

Refactor the Notifier to be more of a generic Reactor #811

Open
bensheldon opened this issue Jan 25, 2023 · 0 comments
Open

Refactor the Notifier to be more of a generic Reactor #811

bensheldon opened this issue Jan 25, 2023 · 0 comments

Comments

@bensheldon
Copy link
Owner

#810 makes me see there's some tech-debt in the Notifier because it's more of a reactor now, but still has a lot of the terminology of when it simply did LISTEN.

  • the listening? predicate should be more like connected? (or have both exist) to separate between "the background thread is connected to the database" and "this is actually doing a LISTEN"
  • The listen/unlisten callbacks should be named connected/disconnected
  • The while-loop+wait_for_notify should be more clearly a "tick" of the reactor.
  • A good design here would mean that the LISTEN functionality could be extracted into a module that registered callbacks, like GoodJob::Notifier::ProcessRegistration

Also could be connected to #796

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Inbox
Development

No branches or pull requests

1 participant