diff options
| author | dumpfmprod <dumpfmprod@ubuntu.(none)> | 2010-11-19 00:59:59 -0500 |
|---|---|---|
| committer | dumpfmprod <dumpfmprod@ubuntu.(none)> | 2010-11-19 00:59:59 -0500 |
| commit | 290257831a6ee4baef8622f91025cd88e053a278 (patch) | |
| tree | 2bc2f11c006dda4c79b0de2fe30d0bcb1620c4e0 /src | |
| parent | 011024632fb7fe9608dbe803a00e3a207680f7c6 (diff) | |
| parent | 52090faa3ca95bbcb1bcea638834f72cf3d93e87 (diff) | |
Merge branch 'master' of /pichat/repo
Diffstat (limited to 'src')
| -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") |
