diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/redisload.clj | 9 |
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) |
