@sidequest/core
Version:
@sidequest/core is the core package of SideQuest, a distributed background job queue for Node.js and TypeScript applications.
20 lines (17 loc) • 661 B
TypeScript
import { JobData } from '../schema/job-data.js';
import { JobTransition } from './transition.js';
/**
* Transition for marking a job as running.
*
* This transition sets the job state to "running", updates the attempted_at timestamp,
* and increments the attempt count.
* It is typically used when a job is claimed and starts execution.
*
* This transition should only be applied to jobs that are in the "claimed" state.
* If the job is not in the "claimed" state, this transition will not run.
*/
declare class RunTransition extends JobTransition {
apply(job: JobData): JobData;
shouldRun(job: JobData): boolean;
}
export { RunTransition };