Skip to content
Discussion options

You must be logged in to vote

Hey, thanks for the detailed report!

I investigated this and here's what's happening:

1. defaultJobOptions is not applied to FlowProducer jobs

This is a current limitation. When you use Queue.add(), defaultJobOptions is merged with per-call options. However, FlowProducer#addChain only uses step.opts — it does not read or merge defaultJobOptions from the queue.

So even if you set repeat: { every: 1000 } in defaultJobOptions, it won't be applied to chain steps.

Workaround for now: set repeat explicitly in each step's opts:

await flow.addChain([
  { name: 'step1', queueName: 'myQueue', data: {}, opts: { repeat: { every: 1000 } } },
  { name: 'step2', queueName: 'myQueue', data: {}, opts: { r…

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@arthurvanl
Comment options

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