Skip to content

Commit

Permalink
fix(job): change moveToFinished return type to reflect jobData (#2706)…
Browse files Browse the repository at this point in the history
… ref #2342
  • Loading branch information
roggervalf committed Aug 14, 2024
1 parent b5993b3 commit de094a3
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/classes/job.ts
Original file line number Diff line number Diff line change
Expand Up @@ -600,13 +600,13 @@ export class Job<
* @param returnValue - The jobs success message.
* @param token - Worker token used to acquire completed job.
* @param fetchNext - True when wanting to fetch the next job.
* @returns Returns the jobData of the next job in the waiting queue.
* @returns Returns the jobData of the next job in the waiting queue or void.
*/
async moveToCompleted(
returnValue: ReturnType,
token: string,
fetchNext = true,
) {
): Promise<void | any[]> {
await this.queue.waitUntilReady();

this.returnvalue = returnValue || void 0;
Expand Down Expand Up @@ -641,7 +641,7 @@ export class Job<
* @param err - the jobs error message.
* @param token - token to check job is locked by current worker
* @param fetchNext - true when wanting to fetch the next job
* @returns void
* @returns Returns the jobData of the next job in the waiting queue or void.
*/
async moveToFailed<E extends Error>(
err: E,
Expand Down

0 comments on commit de094a3

Please sign in to comment.