Automattic / Automattic/kue

Error event listener called twice

Open
#1,004 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
9.4k
Forks
858
PR merge metrics
No merged PRs in 30d

Description

I'm simply subscribing to `error` events as said in docs, but my handler gets called twice. Why is it so and how to avoid that?

``` javascript
let kue = require('kue');
let queue = kue.createQueue();

queue.on('error', e => console.log('Got error', e.message));
```

Contributor guide

No contributing guide indexed for this repository

Research direction

Start with the documented `queue.on('error', ...)` example and trace the error-event path beginning at `createQueue()`. Confirm why the handler fires twice and define done as a documented, reproducible way to avoid duplicate notifications.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, node.js
Domain
backend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.