Skip to content

Commit

Permalink
feat(cli): add a worker-thread options on standalone command
Browse files Browse the repository at this point in the history
  • Loading branch information
tchiotludo committed Apr 2, 2022
1 parent f35e95f commit bd3db0c
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,10 @@ public class StandAloneCommand extends AbstractCommand {
@CommandLine.Option(names = {"-f", "--flow-path"}, description = "the flow path containing flow to inject at startup (when running with a memory flow repository)")
private File flowPath;


@CommandLine.Option(names = {"--worker-thread"}, description = "the number of worker thread")
private Integer workerThread;

public StandAloneCommand() {
super(true);
}
Expand All @@ -55,6 +59,11 @@ public Integer call() throws Exception {
}

StandAloneRunner standAloneRunner = applicationContext.getBean(StandAloneRunner.class);

if (this.workerThread != null) {
standAloneRunner.setWorkerThread(this.workerThread);
}

standAloneRunner.run();

this.shutdownHook(standAloneRunner::close);
Expand Down
2 changes: 1 addition & 1 deletion docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ services:
/usr/bin/wait-for-it -t 60 elasticsearch:9200 && \
curl -s -o /tmp/examples.zip https://kestra.io/examples.zip && \
unzip -o -d /tmp/examples /tmp/examples.zip > /dev/null && \
/app/kestra server standalone --flow-path=/tmp/examples
/app/kestra server standalone --flow-path=/tmp/examples --worker-thread=128
volumes:
- kestra-data:/app/storage
- /var/run/docker.sock:/var/run/docker.sock
Expand Down

0 comments on commit bd3db0c

Please sign in to comment.