Skip to content

Commit b395ddf

Browse files
committed
persisting :retweet_status as its own entity (thus also updating entity in ES)
1 parent 4556c53 commit b395ddf

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

Clojure-Websockets/src/clj/birdwatch/persistence.clj

+3-3
Original file line numberDiff line numberDiff line change
@@ -101,10 +101,10 @@
101101
;; loop for persisting retweets
102102
(go
103103
(while true
104-
(let [t (<! c/rt-persistence-chan)]
105-
(when (:retweeted_status t)
104+
(let [rt (:retweeted_status (<! c/rt-persistence-chan))]
105+
(when rt
106106
(try
107-
(esd/put conn (:es-index conf) "tweet" (:id_str t) t)
107+
(esd/put conn (:es-index conf) "tweet" (:id_str rt) rt)
108108
(catch Exception ex (log/error ex "esd/put error")))))))
109109

110110
;; loop for finding percolation matches and delivering those on the appropriate socket

0 commit comments

Comments
 (0)