Skip to content

Commit 1e9a13f

Browse files
authoredFeb 22, 2024··
fix(add-job): fix parent job cannot be replaced error message (#2441)
1 parent 7fc6f91 commit 1e9a13f

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed
 

‎python/bullmq/scripts.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -574,7 +574,7 @@ def finishedErrors(self, code: int, jobId: str, command: str, state: str) -> Typ
574574
elif code == ErrorCode.JobLockMismatch.value:
575575
return TypeError(f"Lock mismatch for job {jobId}. Cmd {command} from {state}")
576576
elif code == ErrorCode.ParentJobCannotBeReplaced.value:
577-
return TypeError(f"The parent job of job {jobId} cannot be replaced. {command}")
577+
return TypeError(f"The parent job {jobId} cannot be replaced. {command}")
578578
else:
579579
return TypeError(f"Unknown code {str(code)} error for {jobId}.{command}")
580580

‎src/classes/scripts.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -447,7 +447,7 @@ export class Scripts {
447447
);
448448
case ErrorCode.ParentJobCannotBeReplaced:
449449
return new Error(
450-
`The parent job of job ${jobId} cannot be replaced. ${command}`,
450+
`The parent job ${jobId} cannot be replaced. ${command}`,
451451
);
452452
default:
453453
return new Error(`Unknown code ${code} error for ${jobId}. ${command}`);

‎tests/test_flow.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -1465,7 +1465,7 @@ describe('flows', () => {
14651465
},
14661466
),
14671467
).to.be.rejectedWith(
1468-
`The parent job of job ${prefix}:${queueName}:wed cannot be replaced. addJob`,
1468+
`The parent job ${prefix}:${queueName}:wed cannot be replaced. addJob`,
14691469
);
14701470

14711471
await flow.close();

0 commit comments

Comments
 (0)
Please sign in to comment.