This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| (def default-wait-death (time/seconds 5)) | |
| (def default-wait-delay-ms 10) | |
| (defn wait-until* | |
| "wait until a function has become true" | |
| ([name fn] (wait-until* name fn default-wait-death)) | |
| ([name fn wait-death] | |
| (let [die (time/plus (time/now) wait-death)] | |
| (loop [] | |
| (if-let [result (fn)] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| SOME_SETTING = 'some value' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| As always, I'm just playing with interesting things to relax a little bit. Just it. | |
| == 1. Dependencies | |
| I tried to use redis-clojure but it sucks and I shifted to Jedis which rocks. So if you want to try | |
| as well, this little joke (ops! I mean...) program depends on: | |
| * org.clojure/clojure "1.2.0" | |
| * org.clojure/clojure-contrib "1.2.0" | |
| * redis.clients/jedis "1.5.2" |