Upgrade notes
@adonisjs/queue now uses @boringnode/queue@0.6.0, which adds job deduplication and worker heartbeats.
See https://github.com/boringnode/queue/releases/tag/v0.6.0
If you use the database driver and already have a queue_jobs table, run the schema helper once before using the new .dedup() API:
import { QueueSchemaService } from '@adonisjs/queue'
const schema = new QueueSchemaService(db.getWriteClient())
await schema.addDedupColumns()If you use a custom jobs table name, pass it explicitly:
await schema.addDedupColumns('my_queue_jobs')New queue_jobs tables created by the default migration already include these columns.
Deduplication is supported by the Redis and database drivers. The sync driver still executes every dispatch inline, and deduplication does not apply to batch dispatches or scheduled jobs.
If you maintain a custom queue adapter, it must now implement the new renewJobs(queue, jobIds) method used by worker heartbeats.
Job loading lifecycle
Jobs are no longer imported during the provider boot() phase. The queue manager is still initialized during boot, but job discovery now runs during the application start() phase outside of the console environment.
This avoids importing job files before AdonisJS services such as hash, db, or other booted services have been resolved. It fixes cases where a discovered job imports an application model, and that model captures an unresolved service during boot.
Console commands continue to avoid automatic job discovery. Commands that need jobs, such as queue:work, load them explicitly before starting the worker.