Skip to content

Commit 471b84b

Browse files
committed
#326 Using correct method of restarting cluster
1 parent 4d2a01b commit 471b84b

File tree

2 files changed

+4
-8
lines changed

2 files changed

+4
-8
lines changed

gradle.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
group=com.marklogic
22
version=3.6.1
3-
mlAppDeployerDependency=com.marklogic:ml-app-deployer:3.6.1
3+
mlAppDeployerDependency=com.marklogic:ml-app-deployer:dev
44
mlcpUtilDependency=com.marklogic:mlcp-util:0.9.0
55
mlDataMovementDependency=com.marklogic:marklogic-data-movement-components:1.0

src/main/groovy/com/marklogic/gradle/task/cluster/RestartClusterTask.groovy

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,19 +2,15 @@ package com.marklogic.gradle.task.cluster
22

33
import com.marklogic.gradle.task.MarkLogicTask
44
import com.marklogic.mgmt.ManageClient
5-
import com.marklogic.mgmt.admin.ActionRequiringRestart
5+
import com.marklogic.mgmt.resource.clusters.ClusterManager
66
import org.gradle.api.tasks.TaskAction
77

88
class RestartClusterTask extends MarkLogicTask {
99

1010
@TaskAction
1111
void restartCluster() {
1212
final ManageClient client = getManageClient();
13-
getAdminManager().invokeActionRequiringRestart(new ActionRequiringRestart() {
14-
public boolean execute() {
15-
client.postForm("/manage/v2", "state", "restart")
16-
return true;
17-
}
18-
});
13+
println "Restarting local cluster"
14+
new ClusterManager(client).restartLocalCluster(getAdminManager())
1915
}
2016
}

0 commit comments

Comments
 (0)