 (ns runbld.process
   (:require
    [cheshire.core :as json]
-   [clojure.core.async :as async :refer [thread go go-loop chan >! <! >!! <!!
-                                         alts! alts!! close!]]
+   [clojure.core.async
+    :as async
+    :refer [go-loop chan >! <! >!! <!! alts!! close!]]
    [runbld.env :as env]
    [runbld.io :as io]
    [runbld.schema :refer :all]

        listeners [file-ch es-ch stdout-ch stderr-ch]
        result (exec program args scriptfile cwd
                     env listeners log-extra timeout)
        listeners-done (doall
                        (map <!! [file-process
                                  es-process
                                  stdout-process
                                  stderr-process]))
        out-bytes (@(:bytes result) :stdout)
        err-bytes (@(:bytes result) :stderr)
        total-bytes (@(:bytes result) :total)]

    ords      :- Ref
    bytes     :- Ref
    log-extra :- {s/Any s/Any}]
   (async/thread
     (doseq [line (line-seq (io/reader is))]
       (let [log (dosync
                  (inc-ordinals ords label)
