              (put! query-results-chan {:uid (:uid q) :result result}))
            (recur)))
 
-(defrecord Persistence [conf channels]
+(defrecord Persistence [conf channels loops]
   ;; Implement the Lifecycle protocol
   component/Lifecycle
 


        ;; Return the component, optionally modified. Remember that if you
        ;; dissoc one of a record's base fields, you get a plain map.
        (assoc component :connection nil)))

(defn new-persistence [conf]
  (map->Persistence {:conf conf}))

   [clojurewerkz.elastisch.query            :as q]
   [clojurewerkz.elastisch.rest.response    :as esrsp]
   [com.stuartsierra.component :as component]
   [clojure.core.async :as async :refer [<! <!! >! >!! chan put! alts! timeout go go-loop close!]]))

(def conn (esr/connect (:es-address conf)))
(def native-conn (esn/connect [["127.0.0.1" 9300]] {"cluster.name" "elasticsearch_mn"}))
