run apptask and backup task with a nice

A child process inherits whatever nice value is held by the parent at the time that it is forked
This commit is contained in:
Girish Ramakrishnan
2020-08-06 16:46:13 -07:00
parent 2112c7d096
commit 99f989c384
2 changed files with 2 additions and 2 deletions
+1 -1
View File
@@ -68,7 +68,7 @@ function scheduleTask(appId, taskId, callback) {
if (!fs.existsSync(path.dirname(logFile))) safe.fs.mkdirSync(path.dirname(logFile)); // ensure directory
tasks.startTask(taskId, { logFile, timeout: 20 * 60 * 60 * 1000 /* 20 hours */ }, function (error, result) {
tasks.startTask(taskId, { logFile, timeout: 20 * 60 * 60 * 1000 /* 20 hours */, nice: 15 }, function (error, result) {
callback(error, result);
delete gActiveTasks[appId];