Closed anchan828 closed 4 months ago
You can execute worker/processor manually.
@Controller("/worker") class WorkerController { constructor(private readonly service: QueueWorkerService) {} @Post() public async execute(@Body() body: QueueWorkerReceivedMessage): Promise<void> { const workers = await this.service.getWorkers(body.message); for (const worker of workers) { const processors = worker.getProcessors(); for (const processor of processors) { const result = await processor.execute(); if (result.success) { console.log("Success"); } else { console.log("Failed:" + result.error.message); } } } } }
Global Events
__unhandled_queue_worker
__all_queue_workers
preProcessor
postProcessor
Execute worker/processor manually
You can execute worker/processor manually.
Breaking changes
Global Events
: Removed__unhandled_queue_worker
and__all_queue_workers
preProcessor
andpostProcessor