# bunqueue v2.6.4

Fixes 1 bug. SandboxedWorker generics, processor API improvements.

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

---

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

Fixes 1 bug. SandboxedWorker generics, processor API improvements.

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

#### To install bunqueue v2.6.4

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

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

#### To upgrade bunqueue

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

## SandboxedWorker generics

`SandboxedWorker<T>` now supports a generic type parameter for typed events (e.g., `worker.on('completed', (job: Job<MyData>) => ...)`)

## Processor API improvements

Processor files now receive `log()`, `fail()`, and `parentId` on the job object alongside `progress()`

## More additions

- Typed `on()`/`once()` overloads for all SandboxedWorker events (#25)

## Bugfixes

- **Lock token race condition**: Resolved race where concurrent ack/fail operations could use an expired lock token, causing "Invalid or expired lock token" errors under high concurrency. ([#28](https://github.com/egeominotti/bunqueue/issues/28))

## Thanks to 1 contributor!

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

---

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