Skip to content

Commit 5bcfd65

Browse files
fix
1 parent 0f9e283 commit 5bcfd65

File tree

1 file changed

+5
-7
lines changed

1 file changed

+5
-7
lines changed

PluginsAndFeatures/azure-toolkit-for-intellij/azure-intellij-plugin-springcloud/src/main/java/com/microsoft/azure/toolkit/intellij/springcloud/deplolyment/SpringCloudDeploymentConfigurationState.java

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -40,8 +40,6 @@
4040

4141
import java.util.HashMap;
4242
import java.util.Map;
43-
import java.util.Optional;
44-
import java.util.concurrent.Callable;
4543

4644
public class SpringCloudDeploymentConfigurationState implements RunProfileState {
4745
private static final int GET_URL_TIMEOUT = 60;
@@ -68,18 +66,18 @@ public SpringCloudDeploymentConfigurationState(Project project, SpringCloudDeplo
6866
final ConsoleMessager messager = new ConsoleMessager(processHandler);
6967
final ConsoleView consoleView = TextConsoleBuilderFactory.getInstance().createBuilder(this.project).getConsole();
7068
consoleView.attachToProcess(processHandler);
71-
final Callable<Object> execute = () -> {
69+
final Runnable execute = () -> {
7270
try {
73-
return this.execute(messager);
71+
this.execute(messager);
72+
messager.success("Deploy succeed!");
7473
} catch (final Exception e) {
7574
messager.error(e);
7675
}
77-
return Optional.empty();
7876
};
79-
final Disposable subscribe = Mono.fromCallable(execute)
77+
final Disposable subscribe = Mono.fromRunnable(execute)
8078
.doOnTerminate(processHandler::notifyComplete)
8179
.subscribeOn(Schedulers.boundedElastic())
82-
.subscribe((res) -> messager.success("Deploy succeed!"), messager::error);
80+
.subscribe();
8381
processHandler.addProcessListener(new ProcessAdapter() {
8482
@Override
8583
public void processTerminated(@NotNull ProcessEvent event) {

0 commit comments

Comments
 (0)