small fixes

This commit is contained in:
Boki 2025-06-19 23:57:20 -04:00
parent 875296922e
commit 9413d6588d
4 changed files with 24 additions and 3 deletions

View file

@ -147,16 +147,28 @@ async function initializeServices() {
...(scheduledJob.payload || {}),
};
// Build job options from scheduled job config
const jobOptions = {
priority: scheduledJob.priority,
delay: scheduledJob.delay,
repeat: {
immediately: scheduledJob.immediately,
},
};
await queue.addScheduledJob(
scheduledJob.operation,
jobData,
scheduledJob.cronPattern
scheduledJob.cronPattern,
jobOptions
);
totalScheduledJobs++;
logger.info('Scheduled job created', {
handler: handlerName,
operation: scheduledJob.operation,
cronPattern: scheduledJob.cronPattern
cronPattern: scheduledJob.cronPattern,
immediately: scheduledJob.immediately,
priority: scheduledJob.priority
});
}
}