set env var
This commit is contained in:
parent
2bbc8fa5ff
commit
7fea4149c9
3 changed files with 5 additions and 2 deletions
|
|
@ -106,6 +106,8 @@
|
|||
(let [pod-spec (if (string? pod-spec) [pod-spec] pod-spec)
|
||||
pb (ProcessBuilder. ^java.util.List pod-spec)
|
||||
_ (.redirectError pb java.lang.ProcessBuilder$Redirect/INHERIT)
|
||||
_ (doto (.environment pb)
|
||||
(.put "RUN_AS_BABASHKA_POD" "true"))
|
||||
p (.start pb)
|
||||
stdin (.getOutputStream p)
|
||||
stdout (.getInputStream p)
|
||||
|
|
|
|||
|
|
@ -112,4 +112,5 @@
|
|||
:shutdown (System/exit 0))))))))
|
||||
|
||||
(defn -main [& args]
|
||||
(run-pod (set args)))
|
||||
(when (= "true" (System/getenv "RUN_AS_BABASHKA_POD"))
|
||||
(run-pod (set args))))
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@
|
|||
(require '[babashka.pods :as pods])
|
||||
(require '[clojure.core.async :as async])
|
||||
|
||||
(pods/load-pod [\"clojure\" \"-A:test-pod\" \"--run-as-pod\"])
|
||||
(pods/load-pod [\"clojure\" \"-A:test-pod\"])
|
||||
(require '[pod.test-pod :as pod])
|
||||
(def stream-results (atom []))
|
||||
(let [chan (pod.test-pod/range-stream 1 10)]
|
||||
|
|
|
|||
Loading…
Reference in a new issue