Skip to content

Commit

Permalink
feat: improve worker restart
Browse files Browse the repository at this point in the history
feat: improve worker restart
  • Loading branch information
manosbatsis authored Sep 4, 2023
1 parent 373338e commit 7765eea
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
group=com.github.manosbatsis.corda5.testutils
version=1.0.1-SNAPSHOT
version=1.0.2-SNAPSHOT
vendorName=Manos Batsis

kotlin.code.style=official
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,9 +55,13 @@ class NodeHandlesHelper(
private fun buildNodeHandles(): NodeHandles {
var nodesResponse: MutableList<VirtualNodeInfo>? =
virtualNodeInfos(::nodesNullResponseCheck) {
// Force a (re)start even with a forgotten pid present
try { gradle.executeTaskAndWait("stopCorda") } catch (e: Exception) { /* NO-OP */ }
gradle.executeTask("startCorda")
try {
gradle.executeTask("startCorda")
} catch (e: Exception) {
// Force a (re)start even with a forgotten pid present
gradle.executeTaskAndWait("stopCorda")
gradle.executeTask("startCorda")
}
}

logger.info("Combined worker started, node list, size: ${nodesResponse!!.size}")
Expand Down

0 comments on commit 7765eea

Please sign in to comment.