feat(job): implement moveToWaitingChildren for sandboxed jobs
Why
moveToWaitingChildren is not implemented on sandboxed jobs. The docs don't explain this and from what I could see there was no reason for it not to be other than that it just wasn't implemented there.
How
I followed the same approach that the moveToDelayed function uses in a sandboxed job to send commands back to the parent process to actually execute the functionality.
Additional Notes (Optional)
I did not see any tests for moveToDelayed that tested from within a sandboxed process so I wasn't sure if there was somewhere to add tests for this functionality.
I've done a yarn pack and then untarred it in a local bullmq project and confirmed that it was working though.
Fixes #3230
Not having a test for moveToDelayed was definitely an overlook from out part, we will fix it asap.
I actually checked in the codebase and there is indeed a test for moveToDelayed, you can use it for inspiration for your moveToWaitingChildren: https://github.com/taskforcesh/bullmq/blob/master/tests/test_sandboxed_process.ts#L892
just faced the same issue today. Is there any plan to finish this PR @shichongrui ? I see @ocke had plans to work on it as well
UPD: I went ahead and implemented it here: #3389