Guest User

Untitled

a guest
Jan 14th, 2018
71
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.36 KB | None | 0 0
  1. (defn touch-view [db ddoc view]
  2. (db/with-db db (db/get-view ddoc view {:reduce false :limit 0})))
  3.  
  4. (defn future-touch-view [db ddoc view]
  5. (let [f (future (do (touch-view db ddoc view)
  6. (Thread/sleep sleepTime)
  7. ))]
  8. @f))
  9.  
  10. (defn touch-views [views]
  11. (->> (map #(future-touch-view (:db %) (:ddoc %) (:view %)) views)
  12. cycle
  13. dorun))
Add Comment
Please, Sign In to add comment