mirror of
https://github.com/yacy/yacy_search_server.git
synced 2024-09-19 00:01:41 +02:00
enhancement for clearing the crawl queue
This commit is contained in:
parent
5f0bb1214f
commit
a95af11050
|
@ -126,6 +126,8 @@ public class Crawler_p {
|
||||||
|
|
||||||
if (post != null && post.containsKey("queues_terminate_all")) {
|
if (post != null && post.containsKey("queues_terminate_all")) {
|
||||||
// terminate crawls individually
|
// terminate crawls individually
|
||||||
|
sb.crawlQueues.noticeURL.clear();
|
||||||
|
/*
|
||||||
for (final byte[] h: sb.crawler.getActive()) {
|
for (final byte[] h: sb.crawler.getActive()) {
|
||||||
CrawlProfile p = sb.crawler.getActive(h);
|
CrawlProfile p = sb.crawler.getActive(h);
|
||||||
if (CrawlSwitchboard.DEFAULT_PROFILES.contains(p.name())) continue;
|
if (CrawlSwitchboard.DEFAULT_PROFILES.contains(p.name())) continue;
|
||||||
|
@ -134,6 +136,7 @@ public class Crawler_p {
|
||||||
sb.crawler.removePassive(h);
|
sb.crawler.removePassive(h);
|
||||||
try {sb.crawlQueues.noticeURL.removeByProfileHandle(p.handle(), 10000);} catch (SpaceExceededException e) {}
|
try {sb.crawlQueues.noticeURL.removeByProfileHandle(p.handle(), 10000);} catch (SpaceExceededException e) {}
|
||||||
}
|
}
|
||||||
|
*/
|
||||||
|
|
||||||
// clear stacks
|
// clear stacks
|
||||||
for (StackType stackType: StackType.values()) sb.crawlQueues.noticeURL.clear(stackType);
|
for (StackType stackType: StackType.values()) sb.crawlQueues.noticeURL.clear(stackType);
|
||||||
|
|
Loading…
Reference in New Issue
Block a user