UNPKG

torotask

Version:

Task queue processing in NodeJS based on BullMQ and Redis

28 lines 1.23 kB
import { FlowJob, type FlowJobBase, FlowProducer, Job } from 'bullmq'; import { ToroTask } from './client.js'; import type { TaskFlowRun, TaskFlowRunNode, TaskJobOptions, TaskQueueOptions } from './types/index.js'; export declare class TaskWorkflow extends FlowProducer { readonly taskClient: ToroTask; constructor(taskClient: ToroTask, options?: Partial<TaskQueueOptions>); /** * Override the Job class to use TaskJob * @returns {typeof Job} */ protected get Job(): typeof Job; _convertToFlow<TResult extends FlowJobBase<any> = FlowJob, TRun extends TaskFlowRun = TaskFlowRun>(run: TRun, options?: Partial<TaskJobOptions>, removeParentOption?: boolean): TResult; /** * Run a flow with the given options * @param run * @param options * @returns (Promise<TaskFlowRunNode>) */ runFlow(run: TaskFlowRun, options?: Partial<TaskJobOptions>): Promise<TaskFlowRunNode>; /** * Run multiple flows with the given options * @param runs * @param options * @returns (Promise<TaskFlowRunNode[]>) */ runFlows(runs: TaskFlowRun[], options?: Partial<TaskJobOptions>): Promise<TaskFlowRunNode[]>; } //# sourceMappingURL=workflow.d.ts.map