Options for distributed locking.
enabled: boolean
Enable distributed locking. Default false.
storage: "redis"
Lock backend. Only 'redis' is supported when enabled: true.
url: string
Redis connection URL. Default 'redis://localhost:6379'.
client: IRedisLockClient
Injected ioredis-compatible client (preferred over lazy load).
lock: IDistributedLock
Custom lock implementation. Takes priority over storage when present.
ttlMs: number
Lock TTL in milliseconds. Must exceed the job's worst-case runtime.
Bounds TWO distinct guarantees (M70l C3): how long the per-handler OVERLAP mutex lives after a holder dies without releasing, and how long a claimed fire SLOT is remembered before a late replica may re-run it — slot locks are never released, so this value is the replica-skew window. A value below the maximum skew between replicas lets a slow replica re-run an already-claimed fire.