 
 (defn set-state-recorded! [production]
   (log/debugf "Setting production state of %s to recorded" (:id production))
-;;  (transaction)
   (let [new-production
         (-> production
             (merge (dtb/meta-data (path/recorded-path production)))

    new-production))

(defn set-state-split! [production volumes sample-rate bitrate]
;;  (transaction)
  (as-> production p
    (assoc p :volumes volumes)
    (set-state! p "split")

  "Set `production` to `state`"
  [production state]
  (let [p (assoc production :state state)]
    (update! p)
    (when (:product_number p)
      ;; notify the erp of the status change
