feat: support createParam

feat: docker script
This commit is contained in:
CaiHQ 2022-04-21 10:18:48 +08:00
parent 32cc66dad1
commit 71fa74ac14

View File

@ -792,14 +792,9 @@ public class ContractManager {
public String startContractAndRedirect(Contract c, PrintStream ps, String alias, boolean isDebug) { public String startContractAndRedirect(Contract c, PrintStream ps, String alias, boolean isDebug) {
long freeMemory = getFreeMemory(); long freeMemory = getFreeMemory();
if (freeMemory < memoryLimit || statusRecorder.runningProcess.size() > 8) { if (statusRecorder.runningProcess.size() > 5 && (freeMemory < memoryLimit)) {
statusRecorder.hangLeastUsedContractProcess(); statusRecorder.hangLeastUsedContractProcess();
// ContractResult r =
// new ContractResult(
// Status.Error, new JsonPrimitive("insufficient memory:" + freeMemory));
// return JsonUtil.toJson(r);
} }
// SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd");
ContractResult r; ContractResult r;
try { try {
if (c.getScriptStr().startsWith("/")) { if (c.getScriptStr().startsWith("/")) {