Skip to content
Discussion options

You must be logged in to vote

Good catch! This was a bug — fixed in effd637.

What was happening

When upsertJobScheduler registered a cron job, it only stored jobTemplate.data without embedding the name. When the cron fired and pushed a job, the worker extracted name from job.data.name, found nothing, and fell back to 'default'.

This is different from Queue.add(name, data), which correctly embeds the name into the data as { name, ...data }.

The fix

Now upsertJobScheduler embeds jobTemplate.name into the cron job data, matching Queue.add() behavior:

// Before (broken): name was lost
data: jobTemplate?.data ?? {}

// After (fixed): name is embedded in data
data: jobTemplate?.name
  ? { name: jobTemplate.name, ...(jobTemp…

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by arthurvanl
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants