File tree Expand file tree Collapse file tree 1 file changed +7
-3
lines changed
Clojure-Websockets/src/clj/birdwatch Expand file tree Collapse file tree 1 file changed +7
-3
lines changed Original file line number Diff line number Diff line change 64
64
(chsk-send! (:uid res) [:tweet/prev-chunk (:result res)]))
65
65
(recur )))
66
66
67
- (defrecord Communicator [channels]
67
+ (defrecord Communicator [channels chsk-router ]
68
68
component /Lifecycle
69
69
(start [component]
70
70
(log/info " Starting Communicator Component" )
77
77
(run-tweet-stats-loop send-fn connected-uids (:tweet-count channels))
78
78
(run-missing-tweet-loop (:missing-tweet-found channels) send-fn)
79
79
(run-query-results-loop (:query-results channels) send-fn)
80
- (assoc component :ajax-post-fn ajax-post-fn :ajax-get-or-ws-handshake-fn ajax-get-or-ws-handshake-fn)))
80
+ (assoc component :ajax-post-fn ajax-post-fn
81
+ :ajax-get-or-ws-handshake-fn ajax-get-or-ws-handshake-fn
82
+ :chsk-router chsk-router)))
81
83
(stop [component]
82
- (log/info " Stopping Persistence Component" ))) ; ; TODO: teardown
84
+ (log/info " Stopping Communicator Component" )
85
+ (chsk-router ) ; ; stops router loop
86
+ (assoc component :chsk-router nil )))
83
87
84
88
(defn new-communicator [] (map->Communicator {}))
You can’t perform that action at this time.
0 commit comments