interface WorkersQueueOptions
Since 0.2.0

Options for WorkersQueue.

Properties

readonly
optional
logger: LoggerSource

Resolves the logger at the moment a dispatch path needs it, reporting on the four cases that would otherwise be silent: a message whose name has no processor, an unreadable body, a processor that threw, and a job that exhausted its attempts.

A thunk, not an ILogger, for the same reason resolveWaitUntil takes one: the plugin context resolves logger lazily through a Proxy that answers undefined until a logger is registered, and a capability may be registered imperatively without a provides declaration the resolver can order against. Capturing the value during register() freezes whatever was registered by then, so a logger registered afterwards would never receive a report. Omitted leaves every path silent.

readonly
optional
maxDelaySeconds: number

Largest delayMs this queue will accept, in seconds. Defaults to 86400, the platform maximum. A larger delay throws rather than being silently truncated by the platform.

Usage

import { type WorkersQueueOptions } from "cloudflare-plugin/src/index.ts";