WorkerOptions
Defined in: packages/core/src/workers/types.ts:21
Options for registering a worker. Retry options override scheduler defaults for this job name; omitted values inherit those defaults.
Example
Section titled “Example”Extends
Section titled “Extends”RetryOptions
Type Parameters
Section titled “Type Parameters”| Type Parameter | Default type |
|---|---|
T | unknown |
Properties
Section titled “Properties”baseRetryInterval?
Section titled “baseRetryInterval?”Defined in: packages/core/src/scheduler/types.ts:38
Base interval in milliseconds for exponential backoff calculation. Actual delay = 2^failCount * baseRetryInterval
Default
Section titled “Default”Inherited from
Section titled “Inherited from”MonqueOptions.baseRetryInterval
concurrency?
Section titled “concurrency?”Defined in: packages/core/src/workers/types.ts:28
Number of concurrent jobs this worker can process.
Default
Section titled “Default”maxBackoffDelay?
Section titled “maxBackoffDelay?”Defined in: packages/core/src/scheduler/types.ts:46
Maximum delay in milliseconds for exponential backoff. If calculated delay exceeds this value, it will be capped.
Defaults to 24 hours to prevent unbounded delays.
Default
Section titled “Default”Inherited from
Section titled “Inherited from”maxRetries?
Section titled “maxRetries?”Defined in: packages/core/src/scheduler/types.ts:32
Maximum number of retry attempts before marking a job as permanently failed.
Default
Section titled “Default”Inherited from
Section titled “Inherited from”replace?
Section titled “replace?”Defined in: packages/core/src/workers/types.ts:34
Allow replacing an existing worker for the same job name. If false (default) and a worker already exists, throws WorkerRegistrationError.
Default
Section titled “Default”schema?
Section titled “schema?”Defined in: packages/core/src/workers/types.ts:23
Validate persisted input before handling it; the handler receives the schema output.