# bunqueue v2.6.114

Fixes 1 bug. Worker 'ready' event never fires with chained listener: Worker.run() was emitting 'ready' synchronously inside the constructor (when autorun: true, the default), so listeners attached via the chained pattern new…

Canonical: https://bunqueue.dev/blog/bunqueue-v2-6-114/

---

<!-- Generated from changelog.md by docs/scripts/generate-release-posts.ts. Edit the changelog and regenerate. -->

Fixes 1 bug. Worker 'ready' event never fires with chained listener: Worker.run() was emitting 'ready' synchronously inside the constructor (when autorun: true, the default), so listeners attached via the chained pattern new…

![](https://github.com/egeominotti.png?size=64) [egeominotti](https://github.com/egeominotti)

#### To install bunqueue v2.6.114

```bash title="bun"
bun add bunqueue@2.6.114
```

```bash title="npm"
npm install bunqueue@2.6.114
```

#### To upgrade bunqueue

```bash
bun add bunqueue@latest
```

## Bugfixes

- **Worker `'ready'` event never fires with chained listener**: `Worker.run()` was emitting `'ready'` synchronously inside the constructor (when `autorun: true`, the default), so listeners attached via the chained pattern `new Worker(...).on('ready', ...)` were registered too late and missed the event. The emit is now deferred via `queueMicrotask`, so listeners attached synchronously after construction still receive `'ready'`. Fixes [#76](https://github.com/egeominotti/bunqueue/issues/76).

## Thanks to 1 contributor!

- [@egeominotti](https://github.com/egeominotti)

---

[← bunqueue v2.6.113](https://bunqueue.dev/blog/bunqueue-v2-6-113/) · [Release on GitHub](https://github.com/egeominotti/bunqueue/releases/tag/v2.6.114) · [Commits since v2.6.113](https://github.com/egeominotti/bunqueue/compare/v2.6.113...v2.6.114) · [Full changelog](https://bunqueue.dev/changelog/) · [All posts](https://bunqueue.dev/blog/)
