   []
   (swap! inspecting? (fn [_] true)))
 
-(defn- get-sort-or-not-fn
+(defn- get-sort-or-dummy-fn
   "Get sort or dummy function."
   [sort?]
   (if sort? sort #(do %)))

    (let [tpool (get-thread-pool options)
          mstore (mstore/cassandra-metric-store cass-hosts options)
          pstore (pstore/elasticsearch-path-store es-url options)
          sort (get-sort-or-not-fn (:sort options))
          obsolete-data (->> (get-paths pstore tenant paths
                                        (:exclude-paths options)
                                        (:sort options))

  (let [lookup-fn #(pstore/lookup pstore tenant leafs-only limit-depth %
                                  exclude-paths)
        sidefx-wrapper (if sidefx-fn #(do (sidefx-fn %) %) #(do %))
        sort (get-sort-or-dummy-fn sort-paths?)]
    (sort (map :path (map sidefx-wrapper (flatten (map lookup-fn paths)))))))

(defn- get-paths
