Releases: adonisjs/queue
Correct migration stub
Support stable AdonisJS 7
This release updates @adonisjs/queue to align with the stable AdonisJS 7 ecosystem.
It is primarily a compatibility and maintenance release.
Release 0.4.0
Job Retention, Bulk Dispatch & Storage Redesign
This release updates @adonisjs/queue to use @boringnode/queue v0.3.x which includes a complete storage redesign. See the https://github.com/boringnode/queue/releases/tag/v0.3.0 for details.
Breaking Changes
Storage Migration Required
Both Redis and Database adapters have been redesigned. Existing data is incompatible and requires migration.
For Redis users:
- Jobs now use dedicated hash storage with separate sets for queue states
- Either flush old keys or wait for existing jobs to complete before upgrading
For Database users:
Run a migration to add the new columns:
// database/migrations/xxxx_update_queue_jobs.ts
import { BaseSchema } from '@adonisjs/lucid/schema'
export default class extends BaseSchema {
async up() {
this.schema.alterTable('queue_jobs', (table) => {
table.bigint('finished_at').unsigned().nullable()
table.text('error').nullable()
table.index(['queue', 'status', 'finished_at'])
})
// Update status enum to include new values
// PostgreSQL: ALTER TYPE ... ADD VALUE
// MySQL: ALTER TABLE ... MODIFY COLUMN
// SQLite: Recreate table
}
}Note
New projects using node ace queue:migration will automatically get the updated schema.
New Features
Bulk Job Dispatch
Dispatch multiple jobs efficiently in a single batch operation:
await SendEmailJob.dispatchMany([
{ to: 'user1@example.com', subject: 'Newsletter' },
{ to: 'user2@example.com', subject: 'Newsletter' },
])
.group('newsletter-jan-2025')
.toQueue('emails')
.run()Job Grouping
Organize related jobs together for easier monitoring:
await ExportJob.dispatch(data)
.group('export-batch-123')
.run()Job Retention Control
Configure how long completed/failed jobs are kept:
// config/queue.ts
export default defineConfig({
removeOnComplete: { age: 3600 }, // Keep for 1 hour
removeOnFail: { count: 1000 }, // Keep last 1000 failed jobs
})Release 0.2.2
Correct Resolve Config Provider
Update to @boringnode/queue v0.2.0 & DX Improvements
Breaking Changes
This release aligns with the new DI-first Job architecture from @boringnode/queue v0.2.0. The jobFactory signature has been simplified and now only receives JobClass.
The migration stub renames the job_name column to name in queue_schedules. Existing databases require a manual migration.
New Features
The queue:work command now accepts a --concurrency (or -c) flag to control parallel job processing.
node ace queue:work -c 5Bug Fixes
Fixed TypeScript types for defineConfig() which now properly accepts config providers from drivers.
Full Changelog: v0.1.1...v0.2.0
First releases
v0.1.1 chore: use adonis-kit to index commands