     (async/<! (utils/timeout poll-frequency))
     (recur)))
 
-
 (defn- most-recent-build-number [state]
   (->> state
        (map :build-number)

    (if (nil? @build-number-atom)
      (route/set-build-number (most-recent-build-number state)))))

(defn poll-history [history-atom build-number-atom connection-lost-atom]
  (poll-and-dispatch :history-updated connection-lost-atom api/get-build-history (set-build-number-if-missing build-number-atom)))

(defn poll-state [state-atom build-number-atom connection-lost-atom]
  (poll-and-dispatch :pipeline-state-updated connection-lost-atom #(api/get-build-state @build-number-atom) noop))

(defn current-build-header-component [build-number]


(def poll-frequency 1000)

(defn poll-and-dispatch [kw connection-lost-atom fn callback]
  (go-loop []
    (let [new-val (async/<! (fn))]
