Comments (8)
q.Cancel
sounds like a good idea, yeah. I may not get to it before a few weeks, though.
from fetchbot.
Actually I had a little free time and I implemented an experiment on the branch cancel
if you want to take a look. I may have missed a couple things, haven't looked at that code in a while, but if that's it it would be pretty simple. I will test it when I have a bit more time.
from fetchbot.
Did you get a chance to try it out? Was it working as expected?
from fetchbot.
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.
from fetchbot.
Cool, I'll try to look at it today.
On Thu, Jul 23, 2015 at 12:18 David Kitchen [email protected]
wrote:
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.—
Reply to this email directly or view it on GitHub
#10 (comment)
.
from fetchbot.
Much appreciated, in fact if you have a PayPal email let me know. Beer will be bought.
from fetchbot.
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
from fetchbot.
I found the bug and added a test for the Cancel
method, it should now be working as expected and finishing quickly. Let me know how it goes and I'll merge once you confirm it's good for you too (if you're able to test it, of course, otherwise I'll just merge right away).
from fetchbot.
Related Issues (17)
- limit the depth HOT 3
- Handler and Matcher Design HOT 1
- The ability to use multiple goroutines per host HOT 1
- Fail queue object in handler HOT 4
- Crawling sub-domains which share the same server HOT 3
- Expose queue size HOT 3
- Getting lots of i/o timeouts HOT 2
- Cancel() make goroutine leak HOT 1
- Need help to identify the issue in the implementation. HOT 3
- Add a random delay between each cmd? HOT 3
- Parallellize queue HOT 5
- HeaderProvider example HOT 1
- robotstxt-go has renamed to robotstxt HOT 1
- Mux does not prioritize most specific matching Handler
- Update package to use go.mod
- q.Block even if seed empty HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from fetchbot.