Skip to content

Commit

Permalink
fix(cli): disable worker on standalone when 0
Browse files Browse the repository at this point in the history
  • Loading branch information
tchiotludo committed Dec 2, 2023
1 parent 9ef5de2 commit 34c2f8f
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,9 @@ public Integer call() throws Exception {

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

if (this.workerThread != null) {
if (this.workerThread != null && this.workerThread == 0) {
standAloneRunner.setWorkerEnabled(false);
} else if (this.workerThread != null) {
standAloneRunner.setWorkerThread(this.workerThread);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ public void run() {

poolExecutor.execute(applicationContext.getBean(ExecutorInterface.class));

if(workerEnabled) {
if (workerEnabled) {
Worker worker = new Worker(applicationContext, workerThread, null);
applicationContext.registerSingleton(worker);
poolExecutor.execute(worker);
Expand Down

0 comments on commit 34c2f8f

Please sign in to comment.