pass memory limit as argument to starttask.sh

This commit is contained in:
Girish Ramakrishnan
2020-08-10 21:53:07 -07:00
parent 02ee13cfb2
commit 7039108438
2 changed files with 4 additions and 3 deletions
+1 -1
View File
@@ -143,7 +143,7 @@ function startTask(id, options, callback) {
let killTimerId = null, timedOut = false;
gTasks[id] = shell.sudo('startTask', [ START_TASK_CMD, id, logFile, options.nice || 0 ], { preserveEnv: true }, function (error) {
gTasks[id] = shell.sudo('startTask', [ START_TASK_CMD, id, logFile, options.nice || 0, options.memoryLimit || 400 ], { preserveEnv: true }, function (error) {
if (!gTasks[id]) return; // ignore task exit since we are shutting down. see stopAllTasks
const code = error ? error.code : 0;