mirror of
https://gitee.com/BDWare/cm
synced 2025-01-10 09:54:03 +00:00
contract client
This commit is contained in:
parent
3db9180ceb
commit
b251e7e603
@ -262,7 +262,7 @@ public class ContractClient {
|
|||||||
new ProcessBuilder(
|
new ProcessBuilder(
|
||||||
"java",
|
"java",
|
||||||
"-Dfile.encoding=UTF-8",
|
"-Dfile.encoding=UTF-8",
|
||||||
darg,
|
darg, (isDebug ? "-Dlog4j.configurationFile=./log4j2.cp.properties" : ""),
|
||||||
"-jar",
|
"-jar",
|
||||||
classpath,
|
classpath,
|
||||||
"-port=" + startPort,
|
"-port=" + startPort,
|
||||||
@ -317,10 +317,16 @@ public class ContractClient {
|
|||||||
get.syncGet("", "setDBInfo", ContractManager.dbPath);
|
get.syncGet("", "setDBInfo", ContractManager.dbPath);
|
||||||
String tagA = (ps == System.out ? "[Contract_" + port + "_out] " : "");
|
String tagA = (ps == System.out ? "[Contract_" + port + "_out] " : "");
|
||||||
String tagB = (ps == System.out ? "[Contract_" + port + "_err] " : "");
|
String tagB = (ps == System.out ? "[Contract_" + port + "_err] " : "");
|
||||||
outputTracer.track(process, sc, tagA, ps);
|
if (isDebug) {
|
||||||
errorTracer.track(process, new Scanner(process.getErrorStream()), tagB, ps);
|
LOGGER.debug("start as Debug, track err/out");
|
||||||
get.syncGet("", "registerMangerPort", String.valueOf(ContractManager.cPort.getCMPort()));
|
outputTracer.track(process, sc, tagA, ps);
|
||||||
|
errorTracer.track(process, new Scanner(process.getErrorStream()), tagB, ps);
|
||||||
|
} else {
|
||||||
|
LOGGER.debug("start, do not track err/out");
|
||||||
|
sc.close();
|
||||||
|
}
|
||||||
|
|
||||||
|
get.syncGet("", "registerMangerPort", String.valueOf(ContractManager.cPort.getCMPort()));
|
||||||
if (isBundlePath(contractMeta.contract.getScriptStr())) {
|
if (isBundlePath(contractMeta.contract.getScriptStr())) {
|
||||||
status =
|
status =
|
||||||
get.syncGet(
|
get.syncGet(
|
||||||
|
Loading…
Reference in New Issue
Block a user