Skip to content
Permalink
Browse files

Minor refactor to Crawler

  • Loading branch information...
lwj5 committed Mar 4, 2019
1 parent 8b55fcd commit 336c8e2d05448f0861d4afb38e1da12d0caf9060
Showing with 2 additions and 6 deletions.
  1. +2 −6 src/main/java/ai/preferred/venom/Crawler.java
@@ -26,17 +26,13 @@
import ai.preferred.venom.response.Response;
import ai.preferred.venom.response.VResponse;
import ai.preferred.venom.validator.Validator;
import com.google.common.collect.Sets;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import javax.annotation.Nullable;
import javax.validation.constraints.NotNull;
import java.util.*;
import java.util.concurrent.ForkJoinPool;
import java.util.concurrent.ForkJoinWorkerThread;
import java.util.concurrent.Semaphore;
import java.util.concurrent.TimeUnit;
import java.util.concurrent.*;
import java.util.concurrent.atomic.AtomicBoolean;

/**
@@ -162,7 +158,7 @@ private Crawler(final Builder builder) {
true
);
workerManager = builder.workerManager == null ? new ThreadedWorkerManager(threadPool) : builder.workerManager;
pendingJobs = Sets.newConcurrentHashSet();
pendingJobs = ConcurrentHashMap.newKeySet();
handlerExceptions = Collections.synchronizedList(new ArrayList<>());
}

0 comments on commit 336c8e2

Please sign in to comment.
You can’t perform that action at this time.