mirror of
https://github.com/vale981/stream
synced 2025-03-05 10:01:39 -05:00
fix with-process and delete-process!
This commit is contained in:
parent
ac893df07e
commit
86089dcc18
1 changed files with 5 additions and 6 deletions
|
@ -2,7 +2,6 @@
|
||||||
(:require [stream.commander.systemd :as sys]
|
(:require [stream.commander.systemd :as sys]
|
||||||
[stream.commander.journal :as journal]
|
[stream.commander.journal :as journal]
|
||||||
[clojure.string :as string]
|
[clojure.string :as string]
|
||||||
[clojure.core.match :refer [match]]
|
|
||||||
[taoensso.timbre :as timbre
|
[taoensso.timbre :as timbre
|
||||||
:refer [log trace debug info warn error fatal report
|
:refer [log trace debug info warn error fatal report
|
||||||
logf tracef debugf infof warnf errorf fatalf reportf
|
logf tracef debugf infof warnf errorf fatalf reportf
|
||||||
|
@ -238,12 +237,12 @@
|
||||||
[proc proc-var & body]
|
[proc proc-var & body]
|
||||||
`(if-let [~proc-var
|
`(if-let [~proc-var
|
||||||
(cond
|
(cond
|
||||||
(string? proc)
|
(string? ~proc)
|
||||||
(get-process! ~proc)
|
(get-process! ~proc)
|
||||||
|
|
||||||
(instance? process proc)
|
(instance? process ~proc)
|
||||||
proc
|
~proc
|
||||||
:default proc)]
|
:default ~proc)]
|
||||||
(do ~@body)
|
(do ~@body)
|
||||||
false))
|
false))
|
||||||
|
|
||||||
|
@ -258,7 +257,7 @@
|
||||||
(close! (:supervisor proc))
|
(close! (:supervisor proc))
|
||||||
(sys/remove-service! unit-name)
|
(sys/remove-service! unit-name)
|
||||||
(close)
|
(close)
|
||||||
(dosync (commute processes dissoc (:id process)))
|
(dosync (commute processes dissoc (:id proc)))
|
||||||
true)))
|
true)))
|
||||||
|
|
||||||
(defn delete-all-processes! []
|
(defn delete-all-processes! []
|
||||||
|
|
Loading…
Add table
Reference in a new issue