 
 
 
-(def dbg (atom {}))
 
 (defn htseq-file-get [args reqmap]
   (infof "Args %s\nParams %s" args (reqmap :params))

  (@job-configs jobname))


;;; ------------------------------------------------------------------------;;;
;;;                     Server communication database                       ;;;
;;; ------------------------------------------------------------------------;;;


(defmethod user-msg :run [msg]
  (let [params (msg :params)
        {:keys [ws user eid phase]} params]
    (infof "RUN: %s" params)
    (let [vmsg (va/validate-exp eid)]
      (if (not-empty vmsg)
        (send-end-msg ws {:op :validate :payload vmsg})
        (let [{:keys [cmd eid template]} params
              dt (date-time-map)
              resfut (actions/action cmd eid params get-toolinfo template)]
          (aerial.utils.misc/sleep 250)
          (swap! dbg (fn[M] (assoc M eid resfut)))
          (infof "%s : %s" cmd resfut)
          (update-jdb [user (dt :date) (dt :time)]
                      {:action {:params params :template template}
                       :result resfut})
          (if (future-done? resfut)
            (let [cause (->> @resfut (austr/split #">>") second
                             (str "Launch Failed: "))]
              (srv/send-msg ws {:op :error :payload cause}))
            (srv/send-msg ws {:op :launch :payload "Successful"}))
          (srv/send-msg ws {:op :stop :payload {}} :noenvelope true))))))

(defn msg-handler [msg]
