Skip to content

Commit e98eafa

Browse files
committed
more accurate comment
1 parent 43d7de3 commit e98eafa

1 file changed

Lines changed: 2 additions & 3 deletions

File tree

  • packages/payload/src/queues/operations/runJobs

packages/payload/src/queues/operations/runJobs/index.ts

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -349,8 +349,7 @@ export const runJobs = async (args: RunJobsArgs): Promise<RunJobsResult> => {
349349
}
350350

351351
if (!workflowConfig) {
352-
const slugLabel = job.taskSlug ? `task '${job.taskSlug}'` : `workflow '${job.workflowSlug}'`
353-
const errorMessage = `Job references ${slugLabel}, which is not registered in payload.config.jobs. The slug may have been removed from config after the job was queued.`
352+
// Permanently fail jobs that reference a workflow or task that is no longer registered in config, as they can never be completed successfully. No point in retrying them
354353

355354
if (!silent || (typeof silent === 'object' && !silent.error)) {
356355
payload.logger.error({
@@ -371,7 +370,7 @@ export const runJobs = async (args: RunJobsArgs): Promise<RunJobsResult> => {
371370
result: {
372371
status: 'error-reached-max-retries',
373372
},
374-
} // Skip jobs with no workflow configuration
373+
}
375374
}
376375

377376
try {

0 commit comments

Comments
 (0)