Skip to content
Français

QueueRequest

import type { QueueRequest } from "@elie-laloum/outpost";
  • idRequired
    string
    Job ID, 1 to 512 characters and unique in the queue; enqueuing it again returns the stored job.
  • idempotencyKeyOptional
    string | undefined
    Effect key passed to the handler instead of the job ID; defineQueuedTask sets it to the original key when a quota pause republishes the task under a new job ID.
  • handlerRequired
    string
    Name of the worker handler that runs the job, 1 to 512 characters.
  • inputRequired
    WorkflowJson
    JSON input passed to the handler, at most 262144 bytes serialized.
  • deadlineOptional
    number | undefined
    Time in epoch milliseconds after which a pending or active job becomes cancelled; leases never extend past it.
export interface QueueRequest {
  readonly id: string;
  /** Stable effect key for handlers when the job id differs, such as after a quota pause. */
  readonly idempotencyKey?: string;
  readonly handler: string;
  readonly input: WorkflowJson;
  readonly deadline?: number;
}