Skip to content

Instantly share code, notes, and snippets.

@boxxxie
Created October 6, 2011 16:38
Show Gist options
  • Save boxxxie/1267889 to your computer and use it in GitHub Desktop.
Save boxxxie/1267889 to your computer and use it in GitHub Desktop.
(defn touch-view [db ddoc view]
(db/with-db db (db/get-view ddoc view {:reduce false :limit 0})))
(defn future-touch-view [db ddoc view]
(let [f (future (do (touch-view db ddoc view)
(Thread/sleep sleepTime)
))]
@f))
(defn touch-views [views]
(->> (map #(future-touch-view (:db %) (:ddoc %) (:view %)) views)
cycle
dorun))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment