torotask
Version:
Task queue processing in NodeJS based on BullMQ and Redis
40 lines • 1.14 kB
TypeScript
import { BulkJob } from './bulk.js';
import type { TaskJobOptions } from './job.js';
export type StepStatus = 'completed' | 'errored' | 'sleeping' | 'waiting_for_child' | 'waiting_for_children';
/**
* Represents the result of a single step execution.
*/
export interface StepResult<T = any> {
status: StepStatus;
data?: T;
error?: {
message: string;
name?: string;
stack?: string;
containedJobReference?: boolean;
truncated?: boolean;
};
sleepUntil?: number;
eventName?: string;
timeoutAt?: number;
childIdentifier?: string;
childTaskIds?: string[];
}
export interface SimplifiedJob {
jobId: string;
queue: string;
state?: string;
timestamp?: number;
returnValue?: any;
_isMemoizedTaskJob: boolean;
}
export interface BulkJobsReference {
_isBulkJobsReference: true;
count: number;
queueName: string;
timestamp: number;
sampleJobIds?: string[];
}
export type StepTaskJobOptions = Omit<TaskJobOptions, 'parent'>;
export type StepBulkJob<Payload> = Omit<BulkJob<Payload>, 'data' | 'state'>;
//# sourceMappingURL=step.d.ts.map