diff --git a/webmagic-core/src/main/java/us/codecraft/webmagic/scheduler/QueueScheduler.java b/webmagic-core/src/main/java/us/codecraft/webmagic/scheduler/QueueScheduler.java index 8ea3ab19..04d5b36b 100644 --- a/webmagic-core/src/main/java/us/codecraft/webmagic/scheduler/QueueScheduler.java +++ b/webmagic-core/src/main/java/us/codecraft/webmagic/scheduler/QueueScheduler.java @@ -1,11 +1,10 @@ package us.codecraft.webmagic.scheduler; -import us.codecraft.webmagic.Request; -import us.codecraft.webmagic.Task; - import java.util.concurrent.BlockingQueue; import java.util.concurrent.LinkedBlockingQueue; +import us.codecraft.webmagic.Request; +import us.codecraft.webmagic.Task; /** * Basic Scheduler implementation.
@@ -35,6 +34,8 @@ public class QueueScheduler extends DuplicateRemovedScheduler implements Monitor @Override public void pushWhenNoDuplicate(Request request, Task task) { + logger.trace("Remaining capacity: {}", this.queue.remainingCapacity()); + try { queue.put(request); } catch (InterruptedException e) {