Releases: anchan828/nest-cloud-run-queue
Releases · anchan828/nest-cloud-run-queue
v3.0.0
What's Changed
@anchan828/nest-cloud-run-queue-worker
Execute worker/processor manually
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);
}
}
}
}
}
Breaking changes
- Remove
Global Events
: Removed__unhandled_queue_worker
and__all_queue_workers
- Remove config.extraConfig: Removed
preProcessor
andpostProcessor
Full Changelog: v2.4.1...v3.0.0
v2.1.0
v1.0.3
Cloud Tasks is supported from this version. Tasks can be used instead of Cloud Pub/Sub.
- Changed repository and package names to be appropriate for Cloud Tasks.
Most interfaces and class names have been changed. It is easier to find the name of the change by searching on the compare page.
v0.4.41...v1.0.3