Queue deduplication, heartbeats, and safer job loading
· Developer impact : high
The @adonisjs/queue package released version 0.6.2, upgrading its dependency to @boringnode/queue@0.6.0 which introduces job deduplication and worker heartbeats. Database users must update their queue_jobs table schema to support deduplication. Job discovery lifecycle changed to run during application start phase instead of provider boot to avoid premature imports and unresolved services. Console commands still load jobs explicitly. Custom queue adapters must implement a new renewJobs method for heartbeats.
Developers using @adonisjs/queue need to update their database schema if using the database driver, adapt any custom queue adapters to implement the new renewJobs method, and be aware of the changed job loading lifecycle which may affect initialization timing and service resolution. Console commands requiring jobs must explicitly load them now.
- Run QueueSchemaService.addDedupColumns() to update existing queue_jobs tables for deduplication support if using the database driver
- Pass custom jobs table name to addDedupColumns() if applicable
- Implement renewJobs(queue, jobIds) method in any custom queue adapters to support worker heartbeats
- Adjust application code to accommodate job discovery running during application start phase instead of provider boot
- Explicitly load jobs in console commands that require them, such as queue:work
Original sources
AI-generated analysis based on the linked sources. Check the original documentation before changing your application.