Skip to content

Commit

Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
more friendly task name
Browse files Browse the repository at this point in the history
kevinw66 committed Aug 4, 2024
1 parent 8eb7150 commit 660409d
Showing 8 changed files with 9 additions and 4 deletions.
Original file line number Diff line number Diff line change
@@ -72,6 +72,7 @@ protected TaskContext createTaskContext(String hostname) {
taskContext.setStackName(stageContext.getStackName());
taskContext.setStackVersion(stageContext.getStackVersion());
taskContext.setComponentName(componentDTO.getComponentName());
taskContext.setComponentDisplayName(componentDTO.getDisplayName());
taskContext.setServiceUser(serviceDTO.getServiceUser());
taskContext.setServiceGroup(serviceDTO.getServiceGroup());
taskContext.setRoot(clusterPO.getRoot());
Original file line number Diff line number Diff line change
@@ -74,6 +74,7 @@ protected Task createTask(String hostname) {
taskContext.setServiceUser("root");
taskContext.setServiceGroup("root");
taskContext.setComponentName("agent");
taskContext.setComponentDisplayName("Agent");
taskContext.setCommand(Command.CUSTOM);
taskContext.setCustomCommand("update_cache_files");

Original file line number Diff line number Diff line change
@@ -63,6 +63,7 @@ protected Task createTask(String hostname) {
taskContext.setServiceUser("root");
taskContext.setServiceGroup("root");
taskContext.setComponentName("agent");
taskContext.setComponentDisplayName("Agent");
taskContext.setCommand(Command.CUSTOM);
taskContext.setCustomCommand("check_host");

Original file line number Diff line number Diff line change
@@ -33,6 +33,6 @@ protected Command getCommand() {

@Override
public String getName() {
return "Check component " + taskContext.getComponentName() + " on " + taskContext.getHostname();
return "Check " + taskContext.getComponentDisplayName() + " on " + taskContext.getHostname();
}
}
Original file line number Diff line number Diff line change
@@ -49,6 +49,6 @@ public void onSuccess() {

@Override
public String getName() {
return "Install component " + taskContext.getComponentName() + " on " + taskContext.getHostname();
return "Install " + taskContext.getComponentDisplayName() + " on " + taskContext.getHostname();
}
}
Original file line number Diff line number Diff line change
@@ -49,6 +49,6 @@ public void onSuccess() {

@Override
public String getName() {
return "Start component " + taskContext.getComponentName() + " on " + taskContext.getHostname();
return "Start " + taskContext.getComponentDisplayName() + " on " + taskContext.getHostname();
}
}
Original file line number Diff line number Diff line change
@@ -49,6 +49,6 @@ public void onSuccess() {

@Override
public String getName() {
return "Stop component " + taskContext.getComponentName() + " on " + taskContext.getHostname();
return "Stop " + taskContext.getComponentDisplayName() + " on " + taskContext.getHostname();
}
}
Original file line number Diff line number Diff line change
@@ -45,6 +45,8 @@ public class TaskContext {

private String componentName;

private String componentDisplayName;

private Command command;

private String customCommand;

0 comments on commit 660409d

Please sign in to comment.