From e3b6f6b74ea696971fead68db5eb101b264a8e44 Mon Sep 17 00:00:00 2001 From: Matt Wells Date: Fri, 23 May 2014 07:29:18 -0700 Subject: [PATCH] a second fix for crawls saying they're done and then resuming. it seems to happen when we turn spiders off then back on again. so hack that. --- Parms.cpp | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/Parms.cpp b/Parms.cpp index c961a9ae..54069790 100644 --- a/Parms.cpp +++ b/Parms.cpp @@ -18461,6 +18461,25 @@ bool Parms::updateParm ( char *rec , WaitEntry *we ) { if ( cr ) cr->m_needsSave = true; + // + // HACK + // + // special hack. if spidering re-enabled then reset last spider + // attempt time to 0 to avoid the "has no more urls to spider" + // msg followed by the reviving url msg. + if ( base == cr && dst == (char *)&cr->m_spideringEnabled ) + cr->m_localCrawlInfo.m_lastSpiderAttempt = 0; + if ( base == &g_conf && dst == (char *)&g_conf.m_spideringEnabled ){ + for(long i = 0;im_localCrawlInfo.m_lastSpiderAttempt = 0; + } + } + // + // END HACK + // + // all done return true; }