From de30170d65ce248dee9ee325e94c776a081790e9 Mon Sep 17 00:00:00 2001 From: CaiHQ Date: Mon, 23 May 2022 17:06:54 +0800 Subject: [PATCH] doc: docker deploy feat: support docker debug --- .../java/org/bdware/server/action/FileActions.java | 1 - .../org/bdware/server/action/TemporyTestAction.java | 10 +++++++--- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/src/main/java/org/bdware/server/action/FileActions.java b/src/main/java/org/bdware/server/action/FileActions.java index 916937a..8e809e0 100644 --- a/src/main/java/org/bdware/server/action/FileActions.java +++ b/src/main/java/org/bdware/server/action/FileActions.java @@ -375,7 +375,6 @@ public class FileActions { fr.read(content, 0, fr.available()); String manifestJson = new String(content); JsonObject jo = JsonParser.parseString(manifestJson).getAsJsonObject(); - if (jo.get("doi") == null) { String doi = "86.5000.470/do." + geneRandomID(); jo.addProperty("doi", doi); diff --git a/src/main/java/org/bdware/server/action/TemporyTestAction.java b/src/main/java/org/bdware/server/action/TemporyTestAction.java index 152c7ed..1a0c369 100644 --- a/src/main/java/org/bdware/server/action/TemporyTestAction.java +++ b/src/main/java/org/bdware/server/action/TemporyTestAction.java @@ -7,7 +7,6 @@ import org.bdware.sc.*; import org.bdware.sc.bean.Contract; import org.bdware.sc.bean.ContractExecType; import org.bdware.sc.conn.ResultCallback; -import org.bdware.sc.units.MultiContractMeta; import org.bdware.sc.util.JsonUtil; import org.bdware.server.GlobalConf; import org.bdware.server.action.p2p.MasterServerRecoverMechAction; @@ -177,11 +176,16 @@ public class TemporyTestAction { } - @Action(async = true) public void reconnectPort(JsonObject args, ResultCallback resultCallback) { ContractPort.PortVisitor reconnectVisitor = CMActions.manager.statusRecorder.getVisitor(); - reconnectVisitor.visit(args.get("port").getAsInt()); + String host = null; + if (args.has("host")) + host = args.get("host").getAsString(); + if (host != null) + reconnectVisitor.visit(host, args.get("port").getAsInt()); + else + reconnectVisitor.visit(args.get("port").getAsInt()); String data = ContractManager.instance.listContractsWithOwner( args.get("owner").getAsString(), null, 0); JsonObject ret = new JsonObject();