Interface: AddAndWaitOptions
Defined in: glide-mq/src/types.ts:290
Options for Queue.addAndWait(). Extends JobOptions with a wait timeout.
Extends
Properties
attempts?
attempts?: number;Defined in: glide-mq/src/types.ts:261
Inherited from
backoff?
backoff?: object;Defined in: glide-mq/src/types.ts:262
delay
delay: number;jitter?
jitter?: number;type
type: string;Inherited from
cost?
cost?: number;Defined in: glide-mq/src/types.ts:260
Job cost in tokens for token bucket rate limiting. Default: 1.
Inherited from
deduplication?
deduplication?: DeduplicationOptions;Defined in: glide-mq/src/types.ts:269
Inherited from
delay?
delay?: number;Defined in: glide-mq/src/types.ts:235
Inherited from
fallbacks?
fallbacks?: object[];Defined in: glide-mq/src/types.ts:282
Ordered list of fallback configurations tried on retryable failure. Each entry provides model/provider info the processor reads via job.currentFallback.
metadata?
metadata?: Record<string, unknown>;model
model: string;provider?
provider?: string;Inherited from
jobId?
jobId?: string;Defined in: glide-mq/src/types.ts:234
Custom job ID. Max 256 characters, must not contain control characters, curly braces, or colons. If a job with this ID already exists, Queue.add returns null and FlowProducer.add throws. When combined with deduplication, the dedup check runs first.
Inherited from
lifo?
lifo?: boolean;Defined in: glide-mq/src/types.ts:242
Process jobs in LIFO (last-in-first-out) order. Cannot be combined with ordering keys.
Inherited from
lockDuration?
lockDuration?: number;Defined in: glide-mq/src/types.ts:266
Override worker-level lockDuration for this specific job (ms). Controls heartbeat frequency and stall detection threshold.
Inherited from
ordering?
ordering?: object;Defined in: glide-mq/src/types.ts:250
Per-key ordering and group concurrency control. Jobs sharing the same key are constrained to run at most concurrency instances simultaneously across all workers. When concurrency is 1 (default), jobs run sequentially in enqueue order. When concurrency > 1, up to N jobs per key run in parallel.
concurrency?
concurrency?: number;Max concurrent jobs for this ordering key. Default: 1 (sequential).
key
key: string;rateLimit?
rateLimit?: RateLimitConfig;Per-group rate limit: max N jobs per time window for this ordering key.
tokenBucket?
tokenBucket?: TokenBucketConfig;Cost-based token bucket: capacity + refill rate. Jobs consume tokens based on cost.
Inherited from
parent?
parent?: object;Defined in: glide-mq/src/types.ts:270
id
id: string;queue
queue: string;Inherited from
parents?
parents?: object[];Defined in: glide-mq/src/types.ts:277
Multiple parent dependencies for DAG flows. When set, this job waits for ALL parents to complete before it can run. Each parent tracks this job as a child in its deps SET. Mutually exclusive with parent - use one or the other.
id
id: string;queue
queue: string;Inherited from
priority?
priority?: number;Defined in: glide-mq/src/types.ts:240
Integer 0-2048. 1 is the highest priority. 0 (default) means no priority: those jobs run after any waiting job with priority > 0. Other values throw.
Inherited from
removeOnComplete?
removeOnComplete?:
| number
| boolean
| {
age: number;
count: number;
};Defined in: glide-mq/src/types.ts:267
Inherited from
removeOnFail?
removeOnFail?:
| number
| boolean
| {
age: number;
count: number;
};Defined in: glide-mq/src/types.ts:268
Inherited from
signal?
signal?: AbortSignal;Defined in: glide-mq/src/types.ts:297
Abort the wait early. The job stays enqueued; the call rejects with an AbortError and releases its dedicated blocking connection.
timeout?
timeout?: number;Defined in: glide-mq/src/types.ts:263
Inherited from
ttl?
ttl?: number;Defined in: glide-mq/src/types.ts:279
Time-to-live in milliseconds. Jobs not processed within this window are failed as 'expired'.
Inherited from
waitTimeout?
waitTimeout?: number;Defined in: glide-mq/src/types.ts:292
Maximum time to wait for a completed/failed event before rejecting. Default: 30000ms.