             RejectedExecutionException ExecutorService]
            [org.apache.commons.lang3.concurrent BasicThreadFactory BasicThreadFactory$Builder])
   (:require [clojure.core.async :as async]
-            [clojure.tools.logging :as log]))
+            [clojure.tools.logging :as log]
+            [puppetlabs.i18n.core :as i18n]))
 
 (def logging-exception-handler
   "Exception handler that ensures any uncaught exception that occurs
   on this thread is logged"
   (reify Thread$UncaughtExceptionHandler
     (uncaughtException [_ thread throwable]
-      (log/error throwable "Error processing command"))))
+      (log/error throwable
+                 (i18n/trs "Error processing command")))))
 
 (defn thread-factory
   "Creates a command thread factory, wrapping the

                             (finally
                               (.release semaphore)))))
    (catch RejectedExecutionException e
      (log/error e "Message not submitted to command processing threadpool")
      (.release semaphore))))

(defn exec-from-channel


(defn shutdown
  "Shuts down the gated threadpool, ensuring in-flight work is
  complete before tearing it down. Waits up to `shutdown-timeout` (in
  milliseconds) for that work to complete before forcibly shutting
  down the threadpool that work to complete"
  [{:keys [^Semaphore semaphore ^ExecutorService threadpool shutdown-timeout]}]

  ;; Prevent new work from being accepted
