Skip to content

Commit

Permalink
chore(version): update to version 'v0.4.2'.
Browse files Browse the repository at this point in the history
  • Loading branch information
tchiotludo committed Mar 11, 2022
2 parents 754942b + 51508c2 commit ba9ac34
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 17 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
6 changes: 1 addition & 5 deletions core/src/main/java/io/kestra/core/runners/Worker.java
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
22 changes: 13 additions & 9 deletions core/src/main/java/io/kestra/core/utils/ExecutorsUtils.java
Original file line number Diff line number Diff line change
Expand Up @@ -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
);
}

Expand Down
2 changes: 1 addition & 1 deletion docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ services:
path: /tmp/kestra-wd/tmp
url: http://localhost:8080/
ports:
- "28080:8080"
- "8080:8080"
depends_on:
- kafka
- zookeeper
Expand Down
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
version=0.4.1
version=0.4.2
opensearchVersion=1.2.4
micronautVersion=3.3.4
kafkaVersion=3.1.0
Expand Down

0 comments on commit ba9ac34

Please sign in to comment.