v4.0.0
Release Notes - v4.0.0 π
Breaking Changes β οΈ
-
Job Arrays in Handlers:
@Job
and@CronJob
handlers now always receive a job array, consistent with PgBoss v10.
-
Support for
WorkOptions
:- The
@Job
decorator now acceptsWorkOptions
as its options parameter. - This allows configuration, such as specifying
batchSize
.
- The
Migration Notes π οΈ
-
Update Handlers:
// Old @Job('MY_JOB') async handleJob(job: any) { console.log(job.data.id); } // New @Job('MY_JOB', { batchSize: 5 }) // Batch size optional; defaults to 1 async handleJob(jobs: any[]) { for (const job of jobs) { console.log(job.data.id); } }
What's Changed
- feat: allow job & cron job handlers to process job arrays by @samaratungajs in #20
Full Changelog: v3.0.1...v4.0.0