Skip to content
Snippets Groups Projects
Commit 07eff1e6 authored by Rolf Niepraschk's avatar Rolf Niepraschk
Browse files

...

parent f8e54d5b
No related branches found
No related tags found
No related merge requests found
......@@ -9,8 +9,6 @@
[com.brunobonacci.mulog :as µ]))
(defn pp-file [conf task] (str (:PostScriptPy task) ".py"))
(defn pp-file-long [conf task] (str (:py-path conf) "/" (:PostScriptPy task) ".py"))
;;(defn pp-file-long [conf task] (str (:py-path conf) "/" (pp-file conf task)))
(defn exec
"Executes a predefined *python3* script given with the `:PostScriptPy` key.
......@@ -29,6 +27,7 @@
(let [ps (pp-file conf task)]
(if-not (.exists (io/file (str (:py-path conf) "/" (pp-file conf task))))
(let [msg (str "no such postscript file: " (:py-path conf) "/" (pp-file conf task))]
;; TODO: more elegantly! RN, 2023-03-16
(µ/log ::exec :error msg :req-id (:req-id task))
(merge task {:error msg}))
(let [res (sh (:py conf) ps (che/encode task) (che/encode (u/data task)) :dir (:py-path conf))]
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment