better logging when promote does not work
This commit is contained in:
@@ -215,6 +215,8 @@ export async function incomingEvent(job: Job<EventsQueuePayloadIncomingEvent>) {
|
||||
prevEventJobStatus: await prevEventJob
|
||||
.getState()
|
||||
.catch(() => 'unknown'),
|
||||
prevEvent,
|
||||
currEvent: payload,
|
||||
},
|
||||
`Failed to promote job`
|
||||
);
|
||||
|
||||
@@ -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));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user