From 1e8f74a31c7ac19746ec7f166a4e1b4aeaca00c2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christian=20M=C3=BCller?= Date: Sun, 13 Sep 2015 13:40:13 +0200 Subject: [PATCH] decomp method added to decompress of all notes --- src/notehub/storage.clj | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/notehub/storage.clj b/src/notehub/storage.clj index 450784a..8184cc1 100644 --- a/src/notehub/storage.clj +++ b/src/notehub/storage.clj @@ -131,6 +131,14 @@ (redis :sadd (str noteID :urls) url) url)))) +(defn decomp [] + (let [ids (map first (partition 2 (redis :hgetall :note)))] + (doseq [id ids] + (do + (println id) + (redis :hset :note id (get-note id)) + )))) + (defn gc [password dry] (println (get-setting :admin-pw)) (when (= password (get-setting :admin-pw))