Skip to content

Commit

Permalink
avoid spurious logging
Browse files Browse the repository at this point in the history
  • Loading branch information
nlevitt committed Oct 9, 2015
1 parent e4acb6c commit e37b2b4
Showing 1 changed file with 8 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,6 @@ public void run() {

Thread.sleep(10 * 1000);
} catch (InterruptedException e) {

return;
}
}
Expand Down Expand Up @@ -429,13 +428,17 @@ protected CrawlURI makeCrawlUri(JSONObject jo) throws URIException,
public void onApplicationEvent(CrawlStateEvent event) {
switch(event.getState()) {
case PAUSING: case PAUSED:
logger.info("Requesting a pause of the URLConsumer...");
this.pauseConsumer = true;
if (!this.pauseConsumer) {
logger.info("Requesting a pause of the URLConsumer...");
this.pauseConsumer = true;
}
break;

case RUNNING:
logger.info("Requesting unpause of the URLConsumer...");
this.pauseConsumer = false;
if (this.pauseConsumer) {
logger.info("Requesting unpause of the URLConsumer...");
this.pauseConsumer = false;
}
break;

default:
Expand Down

0 comments on commit e37b2b4

Please sign in to comment.