Skip to content

Implementing moveToWaitingChildren in SandboxedJobs #3230

Open
@shichongrui

Description

@shichongrui

Is your feature request related to a problem? Please describe.
I discovered this page (https://docs.bullmq.io/patterns/process-step-jobs#waiting-children) while looking for a solution to a problem I'm working on and thought the moveToWaitingChildren would be ideal for what I'm doing. I kept getting an error though saying job.moveToWaitingChildren is not a function and upon some digging discovered that the SandboxedJob interface does not define it and my worker is running a sandboxed processor.

Describe the solution you'd like
I'm not sure if there is a technical limitation for why sandboxed jobs can not implement the moveToWaitingChildren function but it would be nice if it was possible to use this function from within a sandboxed processor/job.

Describe alternatives you've considered
I noticed that the implementation of moveToWaitingChildren is pretty straightforward so I imported Scripts into my job and then tried

const scripts = new Scripts(queue);
scripts.moveToWaitingChildren(jobId, token)

But it just hangs for a minute and then I get a permanent failure on the job.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions