-
-
Notifications
You must be signed in to change notification settings - Fork 95
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
Drain queue #10
Comments
|
Actually I had a little free time and I implemented an experiment on the branch |
Did you get a chance to try it out? Was it working as expected? |
I got a chance to try it out, but not to debug it (got on a plane and am now in a different city doing different things). It appears to work (it cancels further crawling), but never actually unblocks. Stops here: Line 142 in 96b7aa9
My queue was fairly long at time of cancellation (several thousand URLs at a default rate of 2 reqs per second), but it hangs indefinitely on waiting for something else to mark the waitgroup as done. |
Cool, I'll try to look at it today.
|
Much appreciated, in fact if you have a PayPal email let me know. Beer will be bought. |
Thanks, I appreciate it, but I'm lucky enough to not be needing donations so feel free to give that amount to a charity of your choice. In case you have no preference, those are important to me: https://netdonor.net/ea-action/action?ea.client.id=1770&ea.campaign.id=17989 |
I found the bug and added a test for the |
I have the following scenario:
q.Close()
does not help as even though it prevents new items from getting added to the queue, no method is offered for draining the queue of the existing items.I'm not sure how to approach doing it, otherwise I'd offer a patch, but could a
q.Drain()
be added... or better still aq.Cancel()
which first callsq.Close()
and then drains the queue before returning and releasingq.Block()
.The text was updated successfully, but these errors were encountered: