Skip to content

Commit 1df2d05

Browse files
committed
improvements after initial run of 'lein kibit'
1 parent 686e8e3 commit 1df2d05

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

Clojure-Websockets/src/clj/birdwatch/percolator/elastic.clj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,6 @@
2525
"loop for finding percolation matches and delivering those on the appropriate socket"
2626
(go-loop [] (let [t (<! percolation-chan)
2727
response (perc/percolate conn "percolator" "tweet" :doc t)
28-
matches (into #{} (map #(:_id %1) (esrsp/matches-from response)))] ;; set with SHAs
28+
matches (set (map :_id (esrsp/matches-from response)))] ;; set with SHAs
2929
(put! percolation-matches-chan [t matches @subscriptions]) ;; send deref'd subscriptions as val
3030
(recur))))

Clojure-Websockets/src/clj/birdwatch/twitterclient/processing.clj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
(fn [step]
2323
(let [cnt (volatile! 0)]
2424
(fn [r x]
25-
(when (== (mod @cnt 1000) 0) (log/info "processed" @cnt "since startup"))
25+
(when (zero? (mod @cnt 1000)) (log/info "processed" @cnt "since startup"))
2626
(vswap! cnt inc)
2727
(reset! last-received (t/now))
2828
(step r x)))))

0 commit comments

Comments
 (0)