使用 quartzite 的 cron 示例时得到 "incorrect arity 1 for clojurewerkz.quartzite.jobs/of-type"?

got "incorrect arity 1 for clojurewerkz.quartzite.jobs/of-type" when use the cron example of quartzite?

我尝试使用 cron 示例作为开始页面: http://clojurequartz.info/articles/getting_started.html

(defjob NoOpJob
[ctx]
(comment "Does nothing"))

(defn -main
[& m]
(let [s   (-> (qs/initialize) qs/start)
    job (j/build
          (j/of-type NoOpJob)
          (j/with-identity (j/key "jobs.noop.1")))
    trigger (t/build
              (t/with-identity (t/key "triggers.1"))
              (t/start-now)
              (t/with-schedule (schedule
                                 (cron-schedule "0 0 15 ? * 5"))))]
(qs/schedule s job trigger)))

intellij 在第

行给我 "incorrect arity 1 for clojurewerkz.quartzite.jobs/of-type"
(j/of-type NoOpJob)

我查看了 api 文档: http://reference.clojurequartz.info/clojurewerkz.quartzite.jobs.html#var-of-type

类型的函数有两个参数:

(of-type jb clazz)

有什么问题吗?谢谢!

j/build是一个宏,即"injects"第一个参数(通过线程宏->):

(defmacro ^JobDetail build
  [& body]
  `(let [jb# (JobBuilder/newJob)]
     (finalize (-> jb# ~@body))))

您的 IDE 在这里错误地声明错误。代码很可能编译并运行良好。