Skip to content

Commit

Permalink
rebase dev & resolve conflict
Browse files Browse the repository at this point in the history
  • Loading branch information
pegasas committed Jan 3, 2024
1 parent aff0b35 commit 73ae07d
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@

package org.apache.dolphinscheduler.server.worker.registry;


import org.apache.dolphinscheduler.common.lifecycle.ServerLifeCycleException;
import org.apache.dolphinscheduler.common.lifecycle.ServerLifeCycleManager;
import org.apache.dolphinscheduler.registry.api.RegistryClient;
Expand All @@ -30,6 +31,7 @@
import java.time.Duration;

import lombok.extern.slf4j.Slf4j;
import lombok.NonNull;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
Expand All @@ -52,6 +54,16 @@ public class WorkerWaitingStrategy implements WorkerConnectStrategy {
@Autowired
private WorkerTaskExecutorThreadPool workerManagerThread;

public WorkerWaitingStrategy(@NonNull WorkerConfig workerConfig,
@NonNull RegistryClient registryClient,
@NonNull MessageRetryRunner messageRetryRunner,
@NonNull WorkerTaskExecutorThreadPool workerManagerThread) {
this.workerConfig = workerConfig;
this.registryClient = registryClient;
this.messageRetryRunner = messageRetryRunner;
this.workerManagerThread = workerManagerThread;
}

@Override
public void disconnect() {
try {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,6 @@ public void testWorkerWaitingStrategyreconnect() {
WorkerWaitingStrategy workerWaitingStrategy = new WorkerWaitingStrategy(
workerConfig,
registryClient,
workerRpcServer,
messageRetryRunner,
workerManagerThread
);
Expand Down Expand Up @@ -120,7 +119,6 @@ public void testWorkerWaitingStrategydisconnect() {
WorkerWaitingStrategy workerWaitingStrategy = new WorkerWaitingStrategy(
workerConfig,
registryClient,
workerRpcServer,
messageRetryRunner,
workerManagerThread
);
Expand Down

0 comments on commit 73ae07d

Please sign in to comment.