提交 142c185b 编写于 作者: J Jason Park

Set limits again

上级 9555c52c
......@@ -20,16 +20,16 @@ const trace = lang => (req, res, next) => {
const containerName = uuid.v4();
let killed = false;
const timer = setTimeout(() => {
/* execute(`docker kill ${containerName}`).then(() => {
execute(`docker kill ${containerName}`).then(() => {
killed = true;
});*/
});
}, timeLimit);
return execute([
'docker run --rm',
`--name=${containerName}`,
'-w=/usr/visualization',
`-v=${tempPath}:/usr/visualization:rw`,
//`-m=${memoryLimit}m`,
`-m=${memoryLimit}m`,
'-e ALGORITHM_VISUALIZER=1',
builder.imageName,
].join(' '), { stdout: null, stderr: null }).catch(error => {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册