This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2016-03-11
Channels
- # admin-announcements (20)
- # beginners (48)
- # boot (90)
- # cider (33)
- # cljs-dev (5)
- # cljsjs (10)
- # cljsrn (7)
- # clojure (68)
- # clojure-austin (5)
- # clojure-bangladesh (4)
- # clojure-finland (10)
- # clojure-gamedev (1)
- # clojure-madison (7)
- # clojure-poland (15)
- # clojure-russia (75)
- # clojurescript (25)
- # core-async (23)
- # cursive (5)
- # data-science (43)
- # datomic (15)
- # dirac (26)
- # editors (10)
- # emacs (2)
- # euroclojure (12)
- # funcool (23)
- # hoplon (7)
- # immutant (68)
- # jobs (24)
- # jobs-discuss (1)
- # juxt (1)
- # keechma (9)
- # ldnclj (7)
- # luminus (66)
- # off-topic (54)
- # om (170)
- # proton (7)
- # re-frame (1)
- # reagent (15)
- # ring-swagger (11)
- # spacemacs (6)
- # testing (1)
- # vim (1)
- # yada (19)
(defn start-dirac! []
(require 'dirac.agent)
(let [dirac-boot! (resolve 'dirac.agent/boot!)]
(dirac-boot!)))
(deftask dirac
"run dirac agent"
[]
(with-pre-wrap fileset
(start-dirac!)
fileset))
Is this typical behavior? Gives me undefined variable, though it’s obviously able to call the function?
But won't doing start-dirac!
try to start it each time you re-run the pipeline (like when you watch and something changes?). I don't think that call is idempotent so it could be a problem.
Or do I need to do something like inject a file into the fileset and check that to ensure idempotency?
I just type (start-dirac!)
manually each time and don't mind it, but I can see how it could be a bother.
There certainly must be an appropriate way to inject some code to run when the REPL server boots
Though now I checked #C053K90BR I see they suggested using delay, that also sounds sensible.
(deftask dirac
"run dirac agent"
[]
(let [dirac (delay (start-dirac!))]
(cleanup (.stop @dirac))
(with-pass-thru _ @dirac)))