Skip to content

Interface: AddAndWaitOptions ​

Defined in: glide-mq/src/types.ts:290

Options for Queue.addAndWait(). Extends JobOptions with a wait timeout.

Extends ​

Properties ​

attempts? ​

ts
attempts?: number;

Defined in: glide-mq/src/types.ts:261

Inherited from ​

JobOptions.attempts


backoff? ​

ts
backoff?: object;

Defined in: glide-mq/src/types.ts:262

delay ​

ts
delay: number;

jitter? ​

ts
jitter?: number;

type ​

ts
type: string;

Inherited from ​

JobOptions.backoff


cost? ​

ts
cost?: number;

Defined in: glide-mq/src/types.ts:260

Job cost in tokens for token bucket rate limiting. Default: 1.

Inherited from ​

JobOptions.cost


deduplication? ​

ts
deduplication?: DeduplicationOptions;

Defined in: glide-mq/src/types.ts:269

Inherited from ​

JobOptions.deduplication


delay? ​

ts
delay?: number;

Defined in: glide-mq/src/types.ts:235

Inherited from ​

JobOptions.delay


fallbacks? ​

ts
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? ​

ts
metadata?: Record<string, unknown>;

model ​

ts
model: string;

provider? ​

ts
provider?: string;

Inherited from ​

JobOptions.fallbacks


jobId? ​

ts
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 ​

JobOptions.jobId


lifo? ​

ts
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 ​

JobOptions.lifo


lockDuration? ​

ts
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 ​

JobOptions.lockDuration


ordering? ​

ts
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? ​

ts
concurrency?: number;

Max concurrent jobs for this ordering key. Default: 1 (sequential).

key ​

ts
key: string;

rateLimit? ​

ts
rateLimit?: RateLimitConfig;

Per-group rate limit: max N jobs per time window for this ordering key.

tokenBucket? ​

ts
tokenBucket?: TokenBucketConfig;

Cost-based token bucket: capacity + refill rate. Jobs consume tokens based on cost.

Inherited from ​

JobOptions.ordering


parent? ​

ts
parent?: object;

Defined in: glide-mq/src/types.ts:270

id ​

ts
id: string;

queue ​

ts
queue: string;

Inherited from ​

JobOptions.parent


parents? ​

ts
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 ​

ts
id: string;

queue ​

ts
queue: string;

Inherited from ​

JobOptions.parents


priority? ​

ts
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 ​

JobOptions.priority


removeOnComplete? ​

ts
removeOnComplete?:
  | number
  | boolean
  | {
  age: number;
  count: number;
};

Defined in: glide-mq/src/types.ts:267

Inherited from ​

JobOptions.removeOnComplete


removeOnFail? ​

ts
removeOnFail?:
  | number
  | boolean
  | {
  age: number;
  count: number;
};

Defined in: glide-mq/src/types.ts:268

Inherited from ​

JobOptions.removeOnFail


signal? ​

ts
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? ​

ts
timeout?: number;

Defined in: glide-mq/src/types.ts:263

Inherited from ​

JobOptions.timeout


ttl? ​

ts
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 ​

JobOptions.ttl


waitTimeout? ​

ts
waitTimeout?: number;

Defined in: glide-mq/src/types.ts:292

Maximum time to wait for a completed/failed event before rejecting. Default: 30000ms.

Released under the Apache-2.0 License.