diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index b5095fe1120..ebb1f45cc51 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -23,7 +23,7 @@ jobs: check: name: Check & Publish runs-on: ubuntu-latest - timeout-minutes: 30 + timeout-minutes: 45 env: SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }} steps: diff --git a/core/src/main/java/io/kestra/core/runners/Worker.java b/core/src/main/java/io/kestra/core/runners/Worker.java index 7d4f6e2bc4c..85ec54c60c1 100644 --- a/core/src/main/java/io/kestra/core/runners/Worker.java +++ b/core/src/main/java/io/kestra/core/runners/Worker.java @@ -73,11 +73,7 @@ public Worker(ApplicationContext applicationContext, int thread) { this.metricRegistry = applicationContext.getBean(MetricRegistry.class); ExecutorsUtils executorsUtils = applicationContext.getBean(ExecutorsUtils.class); - this.executors = executorsUtils.maxCachedThreadPool( - Math.min(Runtime.getRuntime().availableProcessors(), thread), - thread, - "worker" - ); + this.executors = executorsUtils.maxCachedThreadPool(thread,"worker"); } @Override diff --git a/core/src/main/java/io/kestra/core/utils/ExecutorsUtils.java b/core/src/main/java/io/kestra/core/utils/ExecutorsUtils.java index 60bc762e419..827cdea8f63 100644 --- a/core/src/main/java/io/kestra/core/utils/ExecutorsUtils.java +++ b/core/src/main/java/io/kestra/core/utils/ExecutorsUtils.java @@ -25,17 +25,21 @@ public ExecutorService cachedThreadPool(String name) { ); } - public ExecutorService maxCachedThreadPool(int minThread, int maxThread, String name) { + public ExecutorService maxCachedThreadPool(int maxThread, String name) { + ThreadPoolExecutor threadPoolExecutor = new ThreadPoolExecutor( + maxThread, + maxThread, + 60L, + TimeUnit.SECONDS, + new LinkedBlockingQueue<>(), + threadFactoryBuilder.build(name + "_%d") + ); + + threadPoolExecutor.allowCoreThreadTimeOut(true); + return this.wrap( name, - new ThreadPoolExecutor( - minThread, - maxThread, - 60L, - TimeUnit.SECONDS, - new LinkedBlockingQueue<>(), - threadFactoryBuilder.build(name + "_%d") - ) + threadPoolExecutor ); } diff --git a/docker-compose.yml b/docker-compose.yml index f590306e801..64916343f99 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -98,7 +98,7 @@ services: path: /tmp/kestra-wd/tmp url: http://localhost:8080/ ports: - - "28080:8080" + - "8080:8080" depends_on: - kafka - zookeeper diff --git a/gradle.properties b/gradle.properties index e5f6048a677..57f7fc277e1 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,4 +1,4 @@ -version=0.4.1 +version=0.4.2 opensearchVersion=1.2.4 micronautVersion=3.3.4 kafkaVersion=3.1.0