   [cmdref stockpile dlo]
   (let [{:keys [path registry metrics]} dlo
         {:keys [command received attempts]} cmdref
-        entry (cmdref->entry cmdref)
+        entry (q/cmdref->entry cmdref)
         cmd-dest (.resolve path (entry-cmd-data-filename entry))]
     ;; We're going to assume that our moves will be atomic, and if
     ;; they're not, that we don't care about the possibility of

              ;; entry-cmd-err-filename below.
              (let [name (-> p .getFileName str)]
                (if-let [cmd (:command (and (.endsWith name ".json")
                                            (parse-cmd-filename name)))]
                  (update-metrics (ensure-cmd-metrics metrics registry cmd)
                                  cmd
                                  (Files/size p))

   [puppetlabs.i18n.core :refer [trs]]
   [puppetlabs.kitchensink.core :refer [timestamp]]
   [puppetlabs.puppetdb.nio :refer [copts copt-atomic copt-replace oopts]]
   [puppetlabs.puppetdb.queue :as q]
   [puppetlabs.stockpile.queue :as stock])
  (:import
   [java.nio.file AtomicMoveNotSupportedException
