mirror of https://github.com/halo-dev/halo
Increase post visit queue and post visit task map init capacity
parent
6b663cce6a
commit
85ba526a1d
|
@ -39,8 +39,8 @@ public class VisitEventListener {
|
||||||
initCapacity = (int) count;
|
initCapacity = (int) count;
|
||||||
}
|
}
|
||||||
|
|
||||||
postVisitQueueMap = new ConcurrentHashMap<>(initCapacity);
|
postVisitQueueMap = new ConcurrentHashMap<>(initCapacity << 1);
|
||||||
postVisitTaskMap = new ConcurrentHashMap<>(initCapacity);
|
postVisitTaskMap = new ConcurrentHashMap<>(initCapacity << 1);
|
||||||
|
|
||||||
this.executor = Executors.newCachedThreadPool();
|
this.executor = Executors.newCachedThreadPool();
|
||||||
}
|
}
|
||||||
|
@ -109,7 +109,7 @@ public class VisitEventListener {
|
||||||
|
|
||||||
log.debug("Increased visits for post id: [{}]", postId);
|
log.debug("Increased visits for post id: [{}]", postId);
|
||||||
} catch (InterruptedException e) {
|
} catch (InterruptedException e) {
|
||||||
log.warn("Post visit task: " + Thread.currentThread().getName() + " was interrupted", e);
|
log.debug("Post visit task: " + Thread.currentThread().getName() + " was interrupted", e);
|
||||||
// Ignore this exception
|
// Ignore this exception
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue