michaelklishin/quartzite

Incorrect build function definition?

martinhynar opened this issue · 1 comments

I just started to use quartzite and became stuck with job definition. From documentation (which is otherwise really good), I defined job:

(j/build
    (j/of-type NoOpJob)
    (j/with-identity (j/key "jobs.noop.1")))

But this was compiled red.

I checked of-type and with-identity and they are both with arity 2, so the documentation example is probably incorrect and shall read:

(-> (j/build)
    (j/of-type NoOpJob)
    (j/with-identity (j/key "jobs.noop.1")))

This goes green compiled, but not executable. build macro creates inside instance of JobBuilder but has ^JobDetail type hint which causes ClassCastException.

P.S. If this is valid, then same problem might be with build for triggers.

OK, it is all correct, my bad. It is because Cursive does not see how macro is expanded and marks it red.