Skip to content

Instantly share code, notes, and snippets.

@tolitius
Created April 30, 2015 18:08
Show Gist options
  • Save tolitius/def9758eaa544bc1d5e9 to your computer and use it in GitHub Desktop.
Save tolitius/def9758eaa544bc1d5e9 to your computer and use it in GitHub Desktop.
component with channels
(defrecord Communicator-Channels []
component/Lifecycle
(start [component] (log/info "Starting Communicator Channels Component")
(assoc component
:query (chan)
:query-results (chan)
:tweet-missing (chan)
:missing-tweet-found (chan)
:persistence (chan)
:rt-persistence (chan)
:tweet-count (chan)
:register-perc (chan)
:perc-matches (chan)))
(stop [component] (log/info "Stop Communicator Channels Component")
(assoc component :query nil :query-results nil :tweet-missing nil :missing-tweet-found nil
:persistence nil :rt-persistence nil :tweet-count nil)))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment