 
 (defn init []
   (try
-    (poll/start-polling (config/hosts-with-config config-dir) timeout-in-ms)
+    (poll/start-polling (config/hosts-with-config config-dir) polling-interval-in-ms)
     (catch FileNotFoundException e
       (binding [*out* *err*]
         (println (.getMessage e))


(def ^:private config-dir (System/getenv "CONFIG_DIR"))

(def ^:private timeout-in-ms (or (some-> (System/getenv "TIMEOUT")
                                         Integer/parseInt)
                                 5000))

(def ^:private config-params [["CONFIG_DIR" (or config-dir
                                                "")]
                              ["TIMEOUT" timeout-in-ms]
                              ["PORT" (or (System/getenv "PORT")
                                          3000)]])


    (html-response (styleguide/render (keywordize-keys params) (styleguide-template)))
    (let [[host-with-statuses last-changed] @poll/statuses]
      (-> (html-response (view/render host-with-statuses
                                      (query-param-as-vec params "systems")
                                      (page-template)
                                      (environment-names)))
          (header "Last-Modified" (format-date (.toDate last-changed)))))))


