Skip to content
This repository has been archived by the owner on Jan 12, 2024. It is now read-only.

Closing workers #1800

Answered by anchan828
nambirajan-goxai asked this question in Q&A
Discussion options

You must be logged in to vote

@nambirajan-goxai Hi, You can use BullService to terminate queue/worker/event. However, since no care is taken after manual termination, unexpected problems may occur.

import { BullService } from "@anchan828/nest-bullmq";

export class YourService {
  constructor(private readonly bullService: BullService) {}

  public async closeWorker() {
    await this.bullService.workers[`queueName`].close();
  }
}

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by nambirajan-goxai
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants