 
 (defonce app-state (atom {
     :nodes []
+    :timer nil
 }))
 
 (def r (t/reader :json))

       (send "http://localhost:9200/temperature-2015.09.08/_search" "POST" payload))))

(defn fetch-events []
    (retrieve search-query #() #() ))

(defn poll
  []
  (let [timer (goog.Timer. 24000)]
    (do (fetch-events)
        (. timer (start))
        (events/listen timer goog.Timer/TICK fetch-events))))

(defn start-app
  []
  (do (poll))
)
(start-app)

(ns ^:figwheel-always pyrexia.core
    (:require
        [clojure.walk :refer [keywordize-keys]]
        [goog.Timer :as timer]
        [goog.events :as events]
        [cognitect.transit :as t])
