Skip to content
Français

QueueHandlerContext

import type { QueueHandlerContext } from "@elie-laloum/outpost";
  • idempotencyKeyRequired
    string
    Stable effect key of this logical job: the request’s idempotencyKey when set, otherwise the job ID shared by every lease and retry. Use it for persistent deduplication of external effects.
  • signalRequired
    AbortSignal
    Aborts when the worker stops or a lease renewal fails, for example after a cancellation, a passed deadline or a lost lease. Pass it to every operation the handler starts.
  • jobRequired
    QueueJob
    Job as claimed, with its request and current fence.
export interface QueueHandlerContext {
  readonly idempotencyKey: string;
  readonly signal: AbortSignal;
  readonly job: QueueJob;
}