简体   繁体   English

Clojure-启动撰写任务

[英]Clojure - boot compose task

I am using boot , and I am happy with it so far. 我正在使用boot ,到目前为止,我对此感到满意。 I still have to run two tasks currently, in two different consoles : boot dev and boot autotest . 目前,我仍然必须在两个不同的控制台中运行两个任务: boot devboot autotest

Therefore I would like to know it it is feasible/advised to make all boot tasks within the same JVM. 因此,我想知道在同一个JVM中进行所有引导任务是可行/建议的。

I tried to compose the tasks like so : 我试图组成这样的任务:

(deftask autotest []
  (comp
    (watch)
    (run-tests)))

(deftask dev
  "Start the dev env..."
  [t run-tests       bool "Run the tests continuously"]
  (comp
   ....
   (if run-tests (autotest) identity)))

But now when running boot dev -t I get an exception from one of the libraries that I am using, which could mean that I have to isolate it. 但是现在,当运行boot dev -t我从正在使用的一个库中获取了一个异常,这可能意味着我必须隔离它。

Are boot tasks intended to be used like that, and can boot pods solve my problem ? 是否打算像这样使用引导任务,并且引导pods可以解决我的问题吗?

Answering my own question: 回答我自己的问题:

  • I no longer have this exception 我不再有这个例外
  • this is one of the strength of boot to use one single JVM (as opposed to leiningen) 这是使用单个JVM boot的优势之一(与leiningen相对)

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM