# bunqueue v2.6.116

Fixes 1 bug. Deduplication broken for long-running scheduled jobs: cleanEmptyQueues() was deleting unique-key entries for queues whose priority queue was empty, even when jobs holding those keys were still actively processing.

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

---

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

Fixes 1 bug. Deduplication broken for long-running scheduled jobs: cleanEmptyQueues() was deleting unique-key entries for queues whose priority queue was empty, even when jobs holding those keys were still actively processing.

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

#### To install bunqueue v2.6.116

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

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

#### To upgrade bunqueue

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

## Bugfixes

- **Deduplication broken for long-running scheduled jobs**: `cleanEmptyQueues()` was deleting unique-key entries for queues whose priority queue was empty, even when jobs holding those keys were still actively processing. This caused the dedup guard to be wiped every ~10 s (the cleanup interval), allowing `every()` / `cron()` to create duplicate jobs. The fix checks `processingShards` and `waitingDeps` before considering a queue "empty". Fixes [#80](https://github.com/egeominotti/bunqueue/issues/80).

## Thanks to 1 contributor!

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

---

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