summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authordumpfmprod <dumpfmprod@ubuntu.(none)>2011-02-23 00:46:34 -0500
committerdumpfmprod <dumpfmprod@ubuntu.(none)>2011-02-23 00:46:34 -0500
commit81f51f9f0ea6abd3d18bed4e9880237e06998ef7 (patch)
tree95e4f1570149179766e83fec767c607510f2b5bb /src
parentc598e3fb726a87251fbb480aacdd37479d766507 (diff)
enable redisload
Diffstat (limited to 'src')
-rw-r--r--src/redisload.clj9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/redisload.clj b/src/redisload.clj
index 15ca299..c08cb32 100644
--- a/src/redisload.clj
+++ b/src/redisload.clj
@@ -153,17 +153,18 @@ WHERE
(defn build-daily-hall [dt]
(let [top-posts (get-top-posts dt 20)
datekey (redis-daily-hall-key dt)]
- (println (count top-posts) "posts for" datekey)
+ (println (count top-posts) "posts for" datekey ", top with" (:score (first top-posts)))
(redis/with-server redis-server
(redis/atomically
- ;(redis/del datekey)
+ (redis/del datekey)
(doseq [m top-posts]
(println (:nick m) (:message_id m) (:score m))
- ;(redis/zadd datekey (:score m) (:message_id m))
+ (redis/zadd datekey (:score m) (:message_id m))
)))))
(defn build-all-daily-hall []
(doseq [dt (get-fav-date-range)]
(build-daily-hall dt)))
-(build-daily-hall (parse-yyyy-mm-dd-date "2010-05-30")) \ No newline at end of file
+;(build-daily-hall (parse-yyyy-mm-dd-date "2010-05-30"))
+;(build-all-daily-hall)