        (if (empty? queries)
          query-results
          (let [[result channel] (async/alts! queries)]
-           ;;(println (count queries))
            (recur
-            (rest queries)
-            (into query-results result))))))))
+            (remove #{channel} queries)
+            (->> result
+                 (map detect-aggregate)
+                 (doall)
+                 (seq)
+                 (into query-results)))))))))
 
 (defn c-get-data
   "Get data from C*."

                                           rollup period from to)))]
        (newline)
        data)
      (catch Exception e
        (alia/shutdown cluster)
        (throw e)))))

;;------------------------------------------------------------------------------
;; ElasticSearch

    (newline)
    (let [paths (es-get-paths eshost path tenant)
          data (c-get-data par-fetch "par-fetch" chost paths tenant rollup period from to)
          ;;data (c-get-data par-fetch-chan "par-fetch-chan" chost paths tenant rollup period from to)
          ;;fdata (flatter data (fn [data] (r/reduce into [] data)) "r/reduce")
          ]
      ;;(flatter data (fn [data] (reduce into data)) "reduce")
      ;;(cleaner fdata (fn [data] (into [] (r/remove nil? data))) "r/remove")
      ;;(cleaner fdata (fn [data] (remove nil? data))  "remove")
