adonis-bull-queue icon indicating copy to clipboard operation
adonis-bull-queue copied to clipboard

Return job handle return value in worker

Open oanylund opened this issue 7 months ago • 0 comments
trafficstars

Why

The return value from the worker is quite handy when using something like bull-board to view job runs.

export default class SomeJob extends Job {
  static get $$filepath() {
    return import.meta.url
  }

  async handle(payload: Payload) {
    return { some: "data" }
  }
}

In bull-board this job would show in ui like

{
  "jobData": {
  },
  "returnValue": {
    "some": "data"
  }
}

oanylund avatar Mar 29 '25 12:03 oanylund