puppeteer-cluster icon indicating copy to clipboard operation
puppeteer-cluster copied to clipboard

How to pause all the workers for some time?

Open adnanmayo opened this issue 5 years ago • 4 comments

hello I am using this library in my porject which is doing awesome job for me.

I am trying to rotate the IP which takes almost 5s to 10s. I want to pause all the workers for that particular time.

Is there any option for this?

adnanmayo avatar Feb 25 '19 17:02 adnanmayo

You could create a custom concurrency implementation. But the way to implement this might change in the not-too-far (at least that's what I hope) future, so I do not recommend that at this point in time.

Other than that there is unfortunately no way to do that, sorry.

thomasdondorf avatar Feb 25 '19 18:02 thomasdondorf

I need this functionality too.

I need a way to pause the workers when an error is encountered so that a user can decide how to proceed. If theres one error in my setup, all the workers will encounter the same error. I tried putting an await function in the taskerror, but that didn't work.

arashrez avatar Feb 28 '19 23:02 arashrez

I'll open it again then. I might add a pause() function in the future as it seems to be a common use case.

thomasdondorf avatar Mar 01 '19 07:03 thomasdondorf

News of this feature?

xino1010 avatar Mar 11 '21 06:03 xino1010