Job queue starts only in the CLI gate (not inside createApp), so tests manage their own queue lifecycle. waitForJob() takes a (name, id) pair to match pg-boss v10's getJobById signature. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
11 lines
243 B
JavaScript
11 lines
243 B
JavaScript
import * as queue from './queue.js';
|
|
import * as echo from './workers/echo.js';
|
|
|
|
const WORKERS = [echo];
|
|
|
|
export async function registerWorkers() {
|
|
for (const w of WORKERS) {
|
|
await queue.subscribe(w.NAME, w.handler, w.opts || {});
|
|
}
|
|
}
|