JobInterruptOptions: {
    code?: number;
    descend?: boolean;
    expire?: number;
    reason?: string;
    stack?: string;
    suppress?: boolean;
    throw?: boolean;
}

Type declaration

  • Optionalcode?: number

    Optional Error Code; will be used as the error code when thrown

    410
    
  • Optionaldescend?: boolean

    interrupt child/descendant jobs

    false
    
  • Optionalexpire?: number

    how long to wait in seconds before fully expiring/removing the hash from Redis; the job is inactive, but can remain in the cache indefinitely;

    1 second.
    
  • Optionalreason?: string

    optional Reason; will be used as the error message when thrown

    'Job Interrupted'
    
  • Optionalstack?: string

    Optional stack trace

  • Optionalsuppress?: boolean

    if true, errors related to inactivation (like overage...already inactive) are suppressed/ignored

    false
    
  • Optionalthrow?: boolean

    throw JobInterrupted error upon interrupting

    true