-
Notifications
You must be signed in to change notification settings - Fork 151
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1842 from microsoft/hotfix-maven-task-manager
maven has no AzureTaskManager which cause spring cloud stuck on deplo…
- Loading branch information
Showing
2 changed files
with
51 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
48 changes: 48 additions & 0 deletions
48
...ib/src/main/java/com/microsoft/azure/toolkit/maven/common/task/MavenAzureTaskManager.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
/* | ||
* Copyright (c) Microsoft Corporation. All rights reserved. | ||
* Licensed under the MIT License. See License.txt in the project root for license information. | ||
*/ | ||
|
||
package com.microsoft.azure.toolkit.maven.common.task; | ||
|
||
import com.microsoft.azure.toolkit.lib.common.task.AzureTask; | ||
import com.microsoft.azure.toolkit.lib.common.task.AzureTaskManager; | ||
import reactor.core.publisher.Mono; | ||
import reactor.core.scheduler.Schedulers; | ||
|
||
public class MavenAzureTaskManager extends AzureTaskManager { | ||
@Override | ||
protected void doRead(Runnable runnable, AzureTask<?> task) { | ||
throw new UnsupportedOperationException("not support"); | ||
} | ||
|
||
@Override | ||
protected void doWrite(Runnable runnable, AzureTask<?> task) { | ||
throw new UnsupportedOperationException("not support"); | ||
} | ||
|
||
@Override | ||
protected void doRunLater(Runnable runnable, AzureTask<?> task) { | ||
throw new UnsupportedOperationException("not support"); | ||
} | ||
|
||
@Override | ||
protected void doRunOnPooledThread(Runnable runnable, AzureTask<?> task) { | ||
Mono.fromRunnable(runnable).subscribeOn(Schedulers.boundedElastic()).subscribe(); | ||
} | ||
|
||
@Override | ||
protected void doRunAndWait(Runnable runnable, AzureTask<?> task) { | ||
runnable.run(); | ||
} | ||
|
||
@Override | ||
protected void doRunInBackground(Runnable runnable, AzureTask<?> task) { | ||
doRunOnPooledThread(runnable, task); | ||
} | ||
|
||
@Override | ||
protected void doRunInModal(Runnable runnable, AzureTask<?> task) { | ||
throw new UnsupportedOperationException("not support"); | ||
} | ||
} |