Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Flow not executed if jobId option is set in parent #972

Closed
terry-au opened this issue Dec 30, 2021 · 0 comments
Closed

Flow not executed if jobId option is set in parent #972

terry-au opened this issue Dec 30, 2021 · 0 comments

Comments

@terry-au
Copy link

If opts.jobId is set in the flow in the below code (sample 1), the process-files process is never executed. If the jobId option is removed, as shown in sample 2, the process-files process is executed.

Additional info:

  • Child processes all have a jobId set
  • Parent and child processes all use promise-based API
  • All running in the same process

Sample 1: broken code (process-files event is not called):

await fileFlowProducer.add({
    name: 'process-files',
    children,
    queueName: 'file-processor',
    opts: {
      jobId: `process-${batchId}-${detailLevel}`,
    },
});

Sample 2: working code (process-files event is called):

await fileFlowProducer.add({
  name: 'process-files',
  children,
  queueName: 'file-processor',
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant