Permalink
Browse files

renaming and moving stuff

  • Loading branch information...
1 parent 7c86b8b commit 63a3846846bd58349c421543ad7b97426c50b3b6 @philandstuff committed Apr 28, 2012
Showing with 6 additions and 6 deletions.
  1. +6 −6 src/grid_jenkins/core.clj
View
@@ -9,7 +9,9 @@
(defonce button-state (atom {}))
-(def jenkins-base-url "http://jenkins/")
+(defonce http-agent (agent nil))
+
+(def jenkins-base-url "http://ci.jruby.org/")
(defn json-url [url]
(if (= \/ (last (seq url)))
@@ -42,14 +44,12 @@
(reset! button-state (zipmap (for [y (range 8) x (range 8)] [x y]) jobs))
(update-lp lp jobs))
-(defonce a (agent nil))
-
-(defn timer-loop [_]
+(defn poll-jenkins-loop [_]
(let [jenkins-status-response (http/get (json-url @#'jenkins-base-url) {:as :json})
jobs (get-in jenkins-status-response [:body :jobs])]
(update-state lp jobs)
(Thread/sleep (* 10 6000))
- (send-off *agent* timer-loop)
+ (send-off *agent* poll-jenkins-loop)
jenkins-status-response))
(defn key-event [event]
@@ -60,5 +60,5 @@
(defn start []
(handlers/add-handler! (:handler-pool lp) :launchpad-key :jenkins key-event)
- (send-off a timer-loop))
+ (send-off http-agent poll-jenkins-loop))

0 comments on commit 63a3846

Please sign in to comment.