JobHandler

interface JobHandler<T>

A job handler. The simple registration path wraps a lambda in this interface, so graduating to a class (for constructor-injected dependencies and direct unit testing) changes no enqueue site and no registration semantics.

Handlers must be reentrant. Never swallow exceptions to "handle" errors: rethrow or let them propagate, because a caught exception means Klokka never learns the job failed.

Functions

Link copied to clipboard
abstract suspend fun JobContext.execute(payload: T)