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
|
prevEventJobStatus: await prevEventJob
|
||||||
.getState()
|
.getState()
|
||||||
.catch(() => 'unknown'),
|
.catch(() => 'unknown'),
|
||||||
|
prevEvent,
|
||||||
|
currEvent: payload,
|
||||||
},
|
},
|
||||||
`Failed to promote job`
|
`Failed to promote job`
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -5,5 +5,5 @@ export async function findJobByPrefix<T>(
|
|||||||
matcher: string
|
matcher: string
|
||||||
) {
|
) {
|
||||||
const delayed = await queue.getJobs('delayed');
|
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