Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 0 additions & 7 deletions .changeset/fine-taxes-drive.md

This file was deleted.

43 changes: 0 additions & 43 deletions .changeset/sweet-oranges-cut.md

This file was deleted.

9 changes: 0 additions & 9 deletions .changeset/wet-sites-juggle.md

This file was deleted.

13 changes: 13 additions & 0 deletions packages/adapter-drizzle/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,18 @@
# @vorsteh-queue/adapter-drizzle

## 0.4.0

### Minor Changes

- b18ec50: Added support for batch processing

### Patch Changes

- 35f7171: update dependencies
- Updated dependencies [66c4848]
- Updated dependencies [35f7171]
- @vorsteh-queue/[email protected]

## 0.3.3

### Patch Changes
Expand Down
2 changes: 1 addition & 1 deletion packages/adapter-drizzle/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@vorsteh-queue/adapter-drizzle",
"version": "0.3.3",
"version": "0.4.0",
"description": "Drizzle ORM adapter for Vorsteh Queue with PostgreSQL support",
"keywords": [
"queue",
Expand Down
13 changes: 13 additions & 0 deletions packages/adapter-kysely/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,18 @@
# @vorsteh-queue/adapter-kysely

## 0.2.0

### Minor Changes

- b18ec50: Added support for batch processing

### Patch Changes

- 35f7171: update dependencies
- Updated dependencies [66c4848]
- Updated dependencies [35f7171]
- @vorsteh-queue/[email protected]

## 0.1.1

### Patch Changes
Expand Down
2 changes: 1 addition & 1 deletion packages/adapter-kysely/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@vorsteh-queue/adapter-kysely",
"version": "0.1.1",
"version": "0.2.0",
"description": "Kysely adapter for Vorsteh Queue with PostgreSQL support",
"keywords": [
"queue",
Expand Down
13 changes: 13 additions & 0 deletions packages/adapter-prisma/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,18 @@
# @vorsteh-queue/adapter-prisma

## 0.3.0

### Minor Changes

- b18ec50: Added support for batch processing

### Patch Changes

- 35f7171: update dependencies
- Updated dependencies [66c4848]
- Updated dependencies [35f7171]
- @vorsteh-queue/[email protected]

## 0.2.3

### Patch Changes
Expand Down
2 changes: 1 addition & 1 deletion packages/adapter-prisma/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@vorsteh-queue/adapter-prisma",
"version": "0.2.3",
"version": "0.3.0",
"description": "Prisma ORM adapter for Vorsteh Queue with PostgreSQL support",
"keywords": [
"queue",
Expand Down
47 changes: 47 additions & 0 deletions packages/core/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,52 @@
# @vorsteh-queue/core

## 0.4.0

### Minor Changes

- 66c4848: ### Added
- Batch processing support: You can now register batch handlers via `queue.registerBatch`, allowing the queue to process multiple jobs at once according to configurable batch sizes and timing.
- New `batch` configuration options: `minSize`, `maxSize`, and `waitFor` allow fine-grained control over when and how batches are processed.
- Type-safe batch jobs: Batch jobs are strictly separated from scheduled/single jobs and **do not support** cron, delay, or repeat options.
- Adapter API extended: All core adapters now support efficient batch operations.
- Events for batch lifecycle: The queue emits `batch:processing`, `batch:completed`, and `batch:failed` events for batch jobs.

**Handler exclusivity:** A queue can handle only batch jobs or single jobs — not both. Attempting to register both handler types in the same queue will throw an error. This ensures clear and predictable processing.

#### Example

```ts
import { MemoryQueueAdapter, Queue } from "@vorsteh-queue/core"

type EmailPayload = { to: string; body: string }
type EmailResult = { ok: boolean }

const adapter = new MemoryQueueAdapter()
const queue = new Queue<EmailPayload, EmailResult>(adapter, {
name: "batch-demo",
batch: { minSize: 5, maxSize: 20, waitFor: 1000 },
})

queue.registerBatch("send-emails", async (jobs) => {
// jobs is an array of up to 20 jobs
await sendBulkEmails(jobs.map((j) => j.payload))
return jobs.map(() => ({ ok: true }))
})

// Add jobs as usual
await queue.addJobs("send-emails", [
{ to: "[email protected]", body: "Hi A" },
{ to: "[email protected]", body: "Hi B" },
// ...
])

queue.start()
```

### Patch Changes

- 35f7171: update dependencies

## 0.3.2

### Patch Changes
Expand Down
2 changes: 1 addition & 1 deletion packages/core/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@vorsteh-queue/core",
"version": "0.3.2",
"version": "0.4.0",
"description": "Core queue engine for Vorsteh Queue with TypeScript support, job scheduling, and event system",
"keywords": [
"queue",
Expand Down
6 changes: 6 additions & 0 deletions packages/create-vorsteh-queue/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# create-vorsteh-queue

## 0.1.5

### Patch Changes

- 35f7171: update dependencies

## 0.1.4

### Patch Changes
Expand Down
2 changes: 1 addition & 1 deletion packages/create-vorsteh-queue/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "create-vorsteh-queue",
"version": "0.1.4",
"version": "0.1.5",
"description": "Create Vorsteh Queue applications with one command",
"keywords": [
"vorsteh-queue",
Expand Down
Loading