       (log/info starting-str)
       (log-cli-cmd options)
       (dry-mode-warn options)
-      (process-metrics tenant rollups paths cass-hosts
-                       (pstore/elasticsearch-path-store es-url options) options
-                       remove-metrics-processor))
+      (cp/with-shutdown! [tpool (get-thread-pool options)]
+        (process-metrics tenant rollups paths cass-hosts
+                         (pstore/elasticsearch-path-store es-url options)
+                         options remove-metrics-processor tpool)))
     (catch Exception e
       (clog/unhandled-error e))))
 

  (try
    (clog/disable-logging!)
    (set-inspecting-on!)
    (process-paths tenant paths (pstore/elasticsearch-path-store es-url options)
                   options list-paths-processor)
    (catch Exception e
      (clog/unhandled-error e))))


      (log/info starting-str)
      (log-cli-cmd options)
      (dry-mode-warn options)
      (cp/with-shutdown! [tpool (get-thread-pool options)]
        (process-paths tenant paths
                       (pstore/elasticsearch-path-store es-url options)
                       options remove-paths-processor tpool)))
    (catch Exception e
      (clog/unhandled-error e))))

