Skip to content

[Bug]: Sandboxed workers do not process jobs if running node with --watch flag #1833

Description

@chaselmann

Version

v.3.10.4

Platform

NodeJS

What happened?

If running node with --watch flag sandboxed workers do not pick up jobs.

I am aware that the --watch flag is still experimental and this is probably rather a node issue than a bullmq issue.
Nevertheless I want to document this behaviour for other users that are running into the same problem.
And maybe you guys have a workaround or an explanation for this issue.

How to reproduce.

I set up a minimal example with instructions to reproduce.

https://github.com/chaselmann/bullmq-sandboxed-processor-watch-mode

Execute example without watch mode

> npm test-no-watch
> test-no-watch
> node index.js

completed inline worker
completed sandboxed worker
{ sandboxedCounts: { wait: 0, completed: 1, failed: 0, active: 0 } }
{ notSandboxedCounts: { wait: 0, completed: 1, failed: 0, active: 0 } }

Execute example with watch mode

> npm test-watch
> test-watch
> node --watch index.js

(node:1706604) ExperimentalWarning: Watch mode is an experimental feature. This feature could change at any time
(Use `node --trace-warnings ...` to show where the warning was created)
completed inline worker
{ sandboxedCounts: { wait: 0, completed: 1, failed: 0, active: 1 } }
{ notSandboxedCounts: { wait: 0, completed: 2, failed: 0, active: 0 } }

Relevant log output

No response

Code of Conduct

  • I agree to follow this project's Code of Conduct

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions