On Saturday 13 December 2008 03:03, Daniel Cheng wrote:
> On Fri, Dec 12, 2008 at 11:21 PM, Matthew Toseland
> <toad at amphibian.dyndns.org> wrote:
> > On Friday 12 December 2008 05:14, j16sdiz at freenetproject.org wrote:
> >> Author: j16sdiz
> >> Date: 2008-12-12 05:14:32 +0000 (Fri, 12 Dec 2008)
> >> New Revision: 24233
> >>
> >> Modified:
> >> trunk/plugins/XMLSpider/XMLSpider.java
> >> Log:
> >> unused variable, comment
> >
> > So how do you determine that we've tried it 3 times and must kill it?
>
> i don't.
> just requeue it at the back.
So it retries forever? Is that what we want?
>
> >>
> >> Modified: trunk/plugins/XMLSpider/XMLSpider.java
> >> ===================================================================
> >> --- trunk/plugins/XMLSpider/XMLSpider.java 2008-12-12 05:14:19 UTC
(rev
> > 24232)
> >> +++ trunk/plugins/XMLSpider/XMLSpider.java 2008-12-12 05:14:32 UTC
(rev
> > 24233)
> >> @@ -295,15 +295,13 @@
> >>
> >> private class MyClientCallback implements ClientCallback {
> >> final Page page;
> >> - final int tries;
> >>
> >> - public MyClientCallback(Page page, int tries) {
> >> + public MyClientCallback(Page page) {
> >> this.page = page;
> >> - this.tries = tries;
> >> }
> >>
> >> public void onFailure(FetchException e, ClientGetter state)
{
> >> - XMLSpider.this.onFailure(e, state, page, tries);
> >> + XMLSpider.this.onFailure(e, state, page);
> >> }
> >>
> >> public void onFailure(InsertException e, BaseClientPutter
state) {
> >> @@ -388,20 +386,20 @@
> >> }
> >> }
> >>
> >> - public void onFailure(FetchException fe, ClientGetter state, Page
page,
> > int tries) {
> >> - Logger.minor(this, "Failed: [" + tries + "] " + page
+ " : " + state,
> > fe);
> >> + public void onFailure(FetchException fe, ClientGetter state, Page
page) {
> >> + Logger.minor(this, "Failed: " + page + " : " + state, fe);
> >>
> >> synchronized (this) {
> >> runningFetch.remove(page);
> >>
> >> if (fe.newURI != null) {
> >> - // redirect, mark as successed
> >> + // redirect, mark as succeeded
> >> queueURI(fe.newURI, "redirect from " +
state.getURI());
> >>
> >> page.status = Status.SUCCEEDED;
> >> page.lastChange =
System.currentTimeMillis();
> >> db.store(page);
> >> - } else if (fe.isFatal() || tries > 3) {
> >> + } else if (fe.isFatal()) {
> >> // too many tries or fatal, mark as failed
> >> page.status = Status.FAILED;
> >> page.lastChange =
System.currentTimeMillis();
> >>
> >> _______________________________________________
> >> cvs mailing list
> >> cvs at freenetproject.org
> >> http://emu.freenetproject.org/cgi-bin/mailman/listinfo/cvs
> >>
> >>
> >
> > _______________________________________________
> > Devl mailing list
> > Devl at freenetproject.org
> > http://emu.freenetproject.org/cgi-bin/mailman/listinfo/devl
> >
> _______________________________________________
> Devl mailing list
> Devl at freenetproject.org
> http://emu.freenetproject.org/cgi-bin/mailman/listinfo/devl
>
>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 827 bytes
Desc: not available
URL:
<https://emu.freenetproject.org/pipermail/devl/attachments/20081213/0f9cb2ab/attachment.pgp>