Skip to content

Commit ca886b1

Browse files
authored
fix: improve job timeout notification by giving the job name and id in the error message (#387)
1 parent a14e1ad commit ca886b1

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/classes/job.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -363,7 +363,7 @@ export class Job<T = any, R = any, N extends string = string> {
363363
return new Promise<any>(async (resolve, reject) => {
364364
let timeout: NodeJS.Timeout;
365365
if (ttl) {
366-
timeout = setTimeout(() => onFailed('timedout'), ttl);
366+
timeout = setTimeout(() => onFailed(`Job wait ${this.name} timed out before finishing, no finish notification arrived after ${ttl}ms (id=${jobId})`), ttl);
367367
}
368368

369369
function onCompleted(args: any) {

0 commit comments

Comments
 (0)