JobQueueStrategy
JobQueueStrategy
Defines how the jobs in the JobQueueService are persisted and accessed. Custom strategies can be defined to make use of external services such as Redis.
info
This is configured via the jobQueueOptions.jobQueueStrategy
property of
your VendureConfig.
Signature
interface JobQueueStrategy extends InjectableStrategy {
add<Data extends JobData<Data> = object>(job: Job<Data>, jobOptions?: JobQueueStrategyJobOptions<Data>): Promise<Job<Data>>;
start<Data extends JobData<Data> = object>(
queueName: string,
process: (job: Job<Data>) => Promise<any>,
): Promise<void>;
stop<Data extends JobData<Data> = object>(
queueName: string,
process: (job: Job<Data>) => Promise<any>,
): Promise<void>;
}
- Extends:
InjectableStrategy