This commit is contained in:
Michiel Borkent 2020-10-14 16:52:36 +02:00
parent 8732bc810b
commit 0ecf6d6d40

View file

@ -224,14 +224,14 @@
(io/file (str ".babashka-pod-" pid ".port")))
(defn read-port [^java.io.File port-file]
(time (loop []
(let [f port-file]
(if-let [s (when (.exists f)
(let [s (slurp f)]
(when (str/ends-with? s "\n")
(str/trim s))))]
(Integer. s)
(recur))))))
(loop []
(let [f port-file]
(if-let [s (when (.exists f)
(let [s (slurp f)]
(when (str/ends-with? s "\n")
(str/trim s))))]
(Integer. s)
(recur)))))
(defn load-pod
([pod-spec] (load-pod pod-spec nil))