|
|
|
|
@ -141,6 +141,7 @@
@@ -141,6 +141,7 @@
|
|
|
|
|
unpopular-notes (filter #(< (try (Long/parseLong (redis :hget :views %)) |
|
|
|
|
(catch Exception a 0)) N) old-notes)] |
|
|
|
|
(println "timestamp:" (str (java.util.Date. timestamp))) |
|
|
|
|
(println (count unpopular-notes) "deleted") |
|
|
|
|
(doseq [note-id unpopular-notes] |
|
|
|
|
(delete-note note-id))))) |
|
|
|
|
(do (println "deleting" note-id) |
|
|
|
|
(delete-note note-id))) |
|
|
|
|
(println (count unpopular-notes) "deleted")))) |
|
|
|
|
|