better logging when promote does not work

This commit is contained in:
Carl-Gerhard Lindesvärd
2024-05-05 14:48:06 +02:00
parent 26909808de
commit 215dac80ae
2 changed files with 3 additions and 1 deletions

View File

@@ -5,5 +5,5 @@ export async function findJobByPrefix<T>(
matcher: string
) {
const delayed = await queue.getJobs('delayed');
return delayed.find((job) => job.opts.jobId?.startsWith(matcher));
return delayed.find((job) => job?.opts?.jobId?.startsWith(matcher));
}