diff options
| -rw-r--r-- | src/redisload.clj | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/redisload.clj b/src/redisload.clj index 9e33039..0e34e2c 100644 --- a/src/redisload.clj +++ b/src/redisload.clj @@ -17,6 +17,7 @@ SELECT m.is_image as is_image, m.created_on as message_ts, r.key as room, + r.admin_only as admin_only, t.created_on as tagged_on, u2.nick as tagger, u2.user_id as tagger_id @@ -43,7 +44,7 @@ WHERE (def popular-map (ref {})) (defn update-popular [r] - (if (:is_image r) + (if (and (:is_image r) (not (:admin_only r))) (dosync (let [user-map (or (get @popular-map (:author r)) {}) msg-cnt (or (get user-map (:message_id r)) 0)] @@ -59,7 +60,7 @@ WHERE (doseq [[msg-id score] (take (* num-popular-dumps 2) sorted-msgs)] (redis/zadd userkey score msg-id))))) - ;; (redis/expire userkey (redis-days 2))))) -- need to schedule auto loader + ;; (redis/expire userkey (redis-days 2))))) -- TODO: schedule auto loader (println "cached popular data for" (count @popular-map) "users")) (println "streaming tags") |
