worker

fun <I, O> worker(type: JobType<I, O>, factory: () -> JabbitWorker<I, O>)(source)

Registers the worker that runs jobs of type.

factory is called anew for every run, so it is the place to pull dependencies out of a container rather than to cache anything.