mirror of
https://gitee.com/BDWare/cm
synced 2025-01-10 09:54:03 +00:00
feat: support createParam
feat: docker script
This commit is contained in:
parent
32cc66dad1
commit
71fa74ac14
@ -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("/")) {
|
||||||
|
Loading…
Reference in New Issue
Block a user