UNPKG

@sidequest/core

Version:

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

22 lines (19 loc) 746 B
import { JobData } from '../schema/job-data.js'; import { JobTransition } from './transition.js'; /** * Transition for marking a job as canceled. * * This transition sets the job state to "canceled" and records the * cancellation timestamp. Canceled jobs will not be retried or processed. * * Running jobs will be aborted, but this transition does not * stop jobs that are already claimed or running. It only marks them as canceled. * The engine will handle the actual stopping of running jobs. * * This transition can be applied to jobs in "waiting" or "running" states. */ declare class CancelTransition extends JobTransition { apply(job: JobData): JobData; shouldRun(job: JobData): boolean; } export { CancelTransition };