Make matcher-service startup more resilient to rdf store failure
@@ -95,16 +95,23 @@ public class MasterCrawlerActor extends UntypedActor {
pubSubMediator.tell(new DistributedPubSubMediator.Subscribe(CrawlUriMessage.class.getName(), getSelf()), getSelf());
pubSubMediator.tell(new DistributedPubSubMediator.Subscribe(
ResourceCrawlUriMessage.class.getName(), getSelf()), getSelf());
-
+ try {
// load the unfinished uris and start crawling
for (CrawlUriMessage msg : sparqlService.retrieveMessagesForCrawling(CrawlUriMessage.STATUS.PROCESS)) {
pendingMessages.put(msg.getUri(), msg);
crawlingWorker.tell(msg, getSelf());
}
+ } catch (Exception e) {
+ log.info("caught exception while obtaining unfinished crawl URIs, we may be missing some needs", e);
+ }
+ try {
for (CrawlUriMessage msg : sparqlService.retrieveMessagesForCrawling(CrawlUriMessage.STATUS.FAILED)) {
getSelf().tell(msg, getSelf());
}
+ } catch (Exception e) {
+ log.info("caught exception while obtaining failed crawl URIs, we may be missing some needs", e);
+ }
}
/**
