*) Bugfix for ArithmeticException caused by setting max crawling thread count was to 0

See: http://www.yacy-forum.de/viewtopic.php?t=2862

git-svn-id: https://svn.berlios.de/svnroot/repos/yacy/trunk@2646 6c8d7289-2bf4-0310-a012-ef5d649a1542
pull/1/head
theli 18 years ago
parent 2d3b96eeba
commit 706572f18d

@ -292,14 +292,14 @@ public class Status {
final plasmaSwitchboard sb = (plasmaSwitchboard)env;
int indexingJobCount = sb.getThread("80_indexing").getJobCount()+sb.indexingTasksInProcess.size();
int indexingMaxCount = plasmaSwitchboard.indexingSlots;
int indexingPercent = indexingJobCount*100/indexingMaxCount;
int indexingPercent = (indexingMaxCount==0)?0:indexingJobCount*100/indexingMaxCount;
prop.put("indexingQueueSize", Integer.toString(indexingJobCount));
prop.put("indexingQueueMax", Integer.toString(indexingMaxCount));
prop.put("indexingQueuePercent",(indexingPercent>100)?"100":Integer.toString(indexingPercent));
int loaderJobCount = sb.cacheLoader.size();
int loaderMaxCount = plasmaSwitchboard.crawlSlots;
int loaderPercent = loaderJobCount*100/loaderMaxCount;
int loaderPercent = (loaderMaxCount==0)?0:loaderJobCount*100/loaderMaxCount;
prop.put("loaderQueueSize", Integer.toString(loaderJobCount));
prop.put("loaderQueueMax", Integer.toString(loaderMaxCount));
prop.put("loaderQueuePercent", (loaderPercent>100)?"100":Integer.toString(loaderPercent));

Loading…
Cancel
Save