   [f-par-fetch host paths tenant rollup period from to]
   (println "Connecting to Cassandra...")
   (let [cluster (alia/cluster {:contact-points [host]})
-        session (alia/connect keyspace cluster)
+        session (alia/connect cluster keyspace)
         fetch! (fetchq session)]
     (println "Getting data form Cassandra...")
     (try

                                                          (seq)
                                                          (swap! data conj)))})
                    paths))]
    (map deref channels)
    @data))

(defn c-get-data

    "SELECT path,data,time FROM metric WHERE "
    "path = ? AND tenant = ? AND rollup = ? AND period = ? "
    "AND time >= ? AND time <= ? ORDER BY time ASC;")))

(defn my-deref
  [f]
  (let [result (deref f 300000 :timeout)]
    (when (= result :timeout)
      (throw (ex-info "Too long!" {})))
    result))

(defn par-fetch
  "Fetch data in parallel fashion."
