get oldest delayed job

This commit is contained in:
Carl-Gerhard Lindesvärd
2024-05-05 15:20:55 +02:00
parent c0c80e7979
commit 3aecbfe627
2 changed files with 17 additions and 2 deletions

View File

@@ -181,7 +181,7 @@ export async function incomingEvent(job: Job<EventsQueuePayloadIncomingEvent>) {
if (payload.name === 'screen_view') {
if (duration < 0) {
job.log(`prevEvent ${JSON.stringify(prevEvent, null, 2)}`);
logger.info({ prevEvent, payload }, 'Duration is negative');
} else {
try {
// Skip update duration if it's wrong