从http://immutant.org/documentation/current/apidoc/guide-installation.html的非突变文档中获得
在建立了依赖关系之后,您只需从应用程序的主入口点(由
:main键在project.clj中标识)调用Im突变服务。
可以调用Im突变的web服务,类似于:
(ns my-app.handler
...
(:require [immutant.web :as web])
... )
(def app ... )
(defn -main [& args]
(web/run app))(web/run app)对于immutant.messaging的等价性是什么
发布于 2015-04-01 11:25:57
在这里,您的答案启动队列
(ns my-project.name
(:require [immutant.messaging :as msg]))
(defn call-fn
[args]
(let [fun (ns-resolve "namespace where fun defined" (symbol (first args)))
params (rest args)]
(if (seq params)
(apply fun )
(fun))))
(msg/start "queue")
(msg/respond "queue" (fn [args] (call-fn args)))打电话给排队只需说
@(msg/request "queue" ["fun-name" params])https://stackoverflow.com/questions/29389235
复制相似问题