Skip to content

Commit

Permalink
GitBook: [master] one page modified
Browse files Browse the repository at this point in the history
  • Loading branch information
manast authored and gitbook-bot committed Feb 16, 2021
1 parent a006bc0 commit 6e61c56
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions docs/gitbook/guide/workers/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,13 @@ A worker is instantiated with the Worker class, and the work itself will be perf
import { Worker, Job } from 'bullmq'

const worker = new Worker(queueName, async (job: Job) => {

// Optionally report some progress
job.updateProgress(42);

// Optionally sending an object as progress
job.updateProgress({ foo: 'bar' });

// Do something with job
return 'some value';
});
Expand Down

0 comments on commit 6e61c56

Please sign in to comment.