Log the remaining capacity.

pull/1015/merge
Joe Zhou 2 years ago
parent 4915431845
commit e735e4e585

@ -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.<br>
@ -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) {

Loading…
Cancel
Save