UNPKG

@sidequest/core

Version:

@sidequest/core is the core package of SideQuest, a distributed background job queue for Node.js and TypeScript applications.

17 lines (14 loc) 570 B
import { JobData } from '../schema/job-data.js'; import { JobTransition } from './transition.js'; /** * Transition for re-running a job. * This will reset the job to waiting state and ensure it can be executed again. * If the job has reached its maximum attempts, it will increase the max_attempts by 1. * * This transition can only be applied to jobs that are in completed, canceled, or failed states. */ declare class RerunTransition extends JobTransition { apply(job: JobData): JobData; shouldRun(job: JobData): boolean; } export { RerunTransition };