瀏覽代碼

print number of worker threads

tags/v0.1.8
Jonathan Cobb 5 年之前
父節點
當前提交
2a6b52a262
共有 1 個文件被更改,包括 6 次插入5 次删除
  1. +6
    -5
      bubble-server/src/main/java/bubble/server/listener/NodeInitializerListener.java

+ 6
- 5
bubble-server/src/main/java/bubble/server/listener/NodeInitializerListener.java 查看文件

@@ -38,11 +38,12 @@ public class NodeInitializerListener extends RestServerLifecycleListenerBase<Bub
if (empty(allLocales)) die("beforeStart: no locales found"); // should never happen

// if we are using the 'http' localNotificationStrategy, ensure we have enough worker threads
if (c.localNotificationStrategy() == LocalNotificationStrategy.http) {
if (!c.getHttp().hasWorkerThreads() || c.getHttp().getWorkerThreads() < MIN_WORKER_THREADS_FOR_LOCAL_HTTP_NOTIFY) {
log.info("beforeStart: http.workerThreads="+c.getHttp().getWorkerThreads()+" is not set or too low, increasing to "+MIN_WORKER_THREADS_FOR_LOCAL_HTTP_NOTIFY);
c.getHttp().setWorkerThreads(MIN_WORKER_THREADS_FOR_LOCAL_HTTP_NOTIFY);
}
if (c.localNotificationStrategy() == LocalNotificationStrategy.http
&& !c.getHttp().hasWorkerThreads() || c.getHttp().getWorkerThreads() < MIN_WORKER_THREADS_FOR_LOCAL_HTTP_NOTIFY) {
log.info("beforeStart: http.workerThreads="+c.getHttp().getWorkerThreads()+" is not set or too low, increasing to "+MIN_WORKER_THREADS_FOR_LOCAL_HTTP_NOTIFY);
c.getHttp().setWorkerThreads(MIN_WORKER_THREADS_FOR_LOCAL_HTTP_NOTIFY);
} else {
log.info("beforeStart: http.workerThreads="+c.getHttp().getWorkerThreads());
}
}



Loading…
取消
儲存