Home > bullmq > Job > moveToCompleted
Moves a job to the completed queue. Returned job to be used with Queue.prototype.nextJobFromJobData.
Signature:
moveToCompleted(returnValue: ReturnType, token: string, fetchNext?: boolean): Promise<JobData | []>;
Parameter | Type | Description |
---|---|---|
returnValue | ReturnType | The jobs success message. |
token | string | Worker token used to acquire completed job. |
fetchNext | boolean | True when wanting to fetch the next job. |
Returns:
Promise<JobData | []>
Returns the jobData of the next job in the waiting queue.