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

Log LogSubscriber lifecycle #12

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions src/lib_onyx/log_subscriber.clj
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
component/Lifecycle

(start [component]
(println "Starting LogSubscriber")
(let [ch (chan inbox-capacity)
{:keys [replica env]} (onyx.api/subscribe-to-log peer-config ch)
state (atom {:as-of-entry nil
Expand All @@ -33,6 +34,7 @@
(assoc sub-component :apply-thread apply-thread)))

(stop [component]
(println "Stopping LogSubscriber")
(close! (:ch component))
(close! (:apply-thread component))
(onyx.api/shutdown-env (:env component))))
Expand Down