Interface: JobOptions
Defined in: glide-mq/src/types.ts:227
Options for controlling individual job behavior (delay, priority, retry, etc.).
Extended by
Properties
attempts?
attempts?: number;Defined in: glide-mq/src/types.ts:261
backoff?
backoff?: object;Defined in: glide-mq/src/types.ts:262
delay
delay: number;jitter?
jitter?: number;type
type: string;cost?
cost?: number;Defined in: glide-mq/src/types.ts:260
Job cost in tokens for token bucket rate limiting. Default: 1.
deduplication?
deduplication?: DeduplicationOptions;Defined in: glide-mq/src/types.ts:269
delay?
delay?: number;Defined in: glide-mq/src/types.ts:235
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;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.
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.
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.
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.
parent?
parent?: object;Defined in: glide-mq/src/types.ts:270
id
id: string;queue
queue: string;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;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.
removeOnComplete?
removeOnComplete?:
| number
| boolean
| {
age: number;
count: number;
};Defined in: glide-mq/src/types.ts:267
removeOnFail?
removeOnFail?:
| number
| boolean
| {
age: number;
count: number;
};Defined in: glide-mq/src/types.ts:268
timeout?
timeout?: number;Defined in: glide-mq/src/types.ts:263
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'.