Skip to content

Commit

Permalink
optimize code
Browse files Browse the repository at this point in the history
  • Loading branch information
ponfee committed Feb 4, 2024
1 parent c41cdba commit 6561c31
Showing 1 changed file with 5 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -78,9 +78,12 @@ public static void main(String[] args) throws Exception {

String group = props.getString(WORKER_KEY_PREFIX + ".group");
Assert.hasText(group, "Worker group name cannot empty.");
String boundHost = JobUtils.getLocalHost(props.getString(DISJOB_BOUND_SERVER_HOST));
String host = JobUtils.getLocalHost(props.getString(DISJOB_BOUND_SERVER_HOST));
String workerToken = workerProperties.getWorkerToken();
String supervisorToken = workerProperties.getSupervisorToken();
String supervisorContextPath = workerProperties.getSupervisorContextPath();

Object[] array = {group, UuidUtils.uuid32(), boundHost, port, workerProperties.getWorkerToken(), workerProperties.getSupervisorToken()};
Object[] array = {group, UuidUtils.uuid32(), host, port, workerToken, supervisorToken, supervisorContextPath};
Worker.Current currentWorker = ClassUtils.invoke(Class.forName(Worker.Current.class.getName()), "create", array);

TimingWheel<ExecuteTaskParam> timingWheel = new TaskTimingWheel(
Expand Down

0 comments on commit 6561c31

Please sign in to comment.