Fetcher2's delay between successive requests

2007-04-24 Thread Doğacan Güney
Hi all, I have been working on Fetcher2 code lately and I came across this particular code (in FetchItemQueue.getFetchItem) that I didn't quite understand: public FetchItem getFetchItem() { ... long last = endTime.get() + (maxThreads 1 ? crawlDelay : minCrawlDelay); ... } Now, the

Re: Fetcher2's delay between successive requests

2007-04-24 Thread Doğacan Güney
I have discovered another bug in Fetcher2. Plugin lib-http checks Protocol.CHECK_{BLOCKING,ROBOTS}(which resolve to strings protocol.plugin.check.{blocking,robots}) to see if it should handle blocking or not. But fetcher2 sets http.plugin.check.{blocking,robots} (notice the protocol/http

Re: Fetcher2's delay between successive requests

2007-04-24 Thread Andrzej Bialecki
Doğacan Güney wrote: Hi all, I have been working on Fetcher2 code lately and I came across this particular code (in FetchItemQueue.getFetchItem) that I didn't quite understand: public FetchItem getFetchItem() { ... long last = endTime.get() + (maxThreads 1 ? crawlDelay : minCrawlDelay);

Re: Fetcher2's delay between successive requests

2007-04-24 Thread Andrzej Bialecki
Doğacan Güney wrote: I have discovered another bug in Fetcher2. Plugin lib-http checks Protocol.CHECK_{BLOCKING,ROBOTS}(which resolve to strings protocol.plugin.check.{blocking,robots}) to see if it should handle blocking or not. But fetcher2 sets http.plugin.check.{blocking,robots} (notice

Re: Fetcher2's delay between successive requests

2007-04-24 Thread Andrzej Bialecki
Doğacan Güney wrote: I don't get it. The code seems to do exactly the opposite of what you are saying. If maxThreads == 1 then maxThreads 1 is false thus the expression evaluates to minCrawlDelay not crawlDelay. Shouldn't the expression be (maxThreads 1 ? minCrawlDelay : crawlDelay) ? Yep,

Re: Fetcher2's delay between successive requests

2007-04-24 Thread Doğacan Güney
On 4/24/07, Andrzej Bialecki [EMAIL PROTECTED] wrote: Doğacan Güney wrote: I don't get it. The code seems to do exactly the opposite of what you are saying. If maxThreads == 1 then maxThreads 1 is false thus the expression evaluates to minCrawlDelay not crawlDelay. Shouldn't the expression