Skip to content

queue.close() kills all processes (jobs) running in all queues #172

Closed
@Gustav0ar

Description

Firstly, I'd like to congratulate you for this awesome library, it helped me a lot.
I've encountered an issue in my app when I create separate Queues (with different names) to execute a single job and when the job finishes I close the queue.
There is a bug when doing queue.close() that will kill every job running in separate processes in all queues, not just the one I'm closing.
I traced the bug to child-pool.ts on line 98, it will get all the processes running in this.retained and kill them. It should filter out to only get the processes linked to that specific queue.

The steps to reproduce are the following:

  1. Create queue A
  2. Run job on queue A
  3. Create queue B
  4. Run a job on queue B
  5. Execute queue.close() on either one while both jobs are running
  6. It will kill both processes, not just the one for the queue that you executed

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions