bullmq - v5.73.5
    Preparing search index...

    Type Alias DeduplicationOptions

    DeduplicationOptions: { id: string } & {
        extend?: boolean;
        keepLastIfActive?: boolean;
        replace?: boolean;
        ttl?: number;
    }

    Deduplication options

    Type Declaration

    • id: string

      Identifier

    • Optionalextend?: boolean

      Extend ttl value

    • OptionalkeepLastIfActive?: boolean

      If true, when a job with the same deduplication ID is currently active (being processed), the new job's data will be stored and a new job will be created automatically when the active one finishes (completes or fails). If multiple jobs are added while the active job is running, only the latest data is kept.

      This guarantees that at most 2 jobs per deduplication ID exist at any time: 1 active and 1 waiting, preventing parallel execution of jobs with the same deduplication ID.

      Note: when this option is set, ttl is ignored. The dedup key is kept alive without expiry for the job's entire lifecycle and cleaned up on completion or failure.

    • Optionalreplace?: boolean

      replace job record while it's in delayed state

    • Optionalttl?: number

      ttl in milliseconds