Remove unused spider status

This commit is contained in:
Ai Lin Chia
2017-06-16 16:58:39 +02:00
parent 2baadc1071
commit 73a64b789f
2 changed files with 11 additions and 29 deletions

@ -221,10 +221,7 @@ int32_t SpiderReply::print ( SafeBuf *sbarg ) {
}
int32_t SpiderRequest::printToTable ( SafeBuf *sb , const char *status ,
XmlDoc *xd , int32_t row ) {
int32_t SpiderRequest::printToTable(SafeBuf *sb, const char *status, XmlDoc *xd, int32_t row) {
sb->safePrintf("<tr bgcolor=#%s>\n",LIGHT_BLUE);
// show elapsed time
@ -2839,21 +2836,6 @@ bool getSpiderStatusMsg ( CollectionRec *cx , SafeBuf *msg , int32_t *status ) {
return msg->safePrintf("Job is initializing.");
}
if ( cx->m_spiderStatus == SP_ROUNDDONE ) {
*status = SP_ROUNDDONE;
return msg->safePrintf ( "Nothing currently "
"available to spider. "
"Change your url filters, try "
"adding new urls, or wait for "
"existing urls to be respidered.");
}
if ( cx->m_spiderStatus == SP_ROUNDDONE ) {
*status = SP_ROUNDDONE;
return msg->safePrintf ( "Job round completed.");
}
if ( ! g_conf.m_spideringEnabled ) {
*status = SP_ADMIN_PAUSED;
return msg->safePrintf("All crawling temporarily paused "

@ -29,16 +29,16 @@ class SpiderColl;
// . values for CollectionRec::m_spiderStatus
// . reasons why crawl is not happening
#define SP_INITIALIZING 0
//#define SP_UNUSED 1
//#define SP_UNUSED 2
//#define SP_UNUSED 3
#define SP_ROUNDDONE 4 // spider round is done
#define SP_NOURLS 5 // initializing
#define SP_PAUSED 6 // user paused spider
#define SP_INPROGRESS 7 // it is going on!
#define SP_ADMIN_PAUSED 8 // g_conf.m_spideringEnabled = false
#define SP_COMPLETED 9 // crawl is done, and no repeatCrawl is scheduled
#define SP_INITIALIZING 0
//#define SP_UNUSED_1 1
//#define SP_UNUSED_2 2
//#define SP_UNUSED_3 3
//#define SP_UNUSED_4 4
//#define SP_UNUSED_5 5
#define SP_PAUSED 6 // user paused spider
#define SP_INPROGRESS 7 // it is going on!
#define SP_ADMIN_PAUSED 8 // g_conf.m_spideringEnabled = false
//#define SP_UNUSED_9 9
bool getSpiderStatusMsg ( class CollectionRec *cx ,
class SafeBuf *msg ,