Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(job): change moveToFinished return type to reflect jobData #2706

Merged
merged 1 commit into from
Aug 14, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading