Skip to content

JobContextHook

The app’s hook for carrying its own context across the queue.

capture(): Readonly<Record<string, string>> | undefined

Called in the producer: the string fields to carry (ids only, never secrets).

Readonly<Record<string, string>> | undefined


run<T>(context, fn): T

Called in the worker: run fn with the captured fields re-entered.

T

Readonly<Record<string, string>>

() => T

T