backups: give is a low oomScoreAdjust to not get killed

This commit is contained in:
Girish Ramakrishnan
2024-07-19 13:05:09 +02:00
parent 083432cbfe
commit d5ea99603f
4 changed files with 5 additions and 4 deletions
+1 -1
View File
@@ -170,7 +170,7 @@ function startTask(id, options, onTaskFinished) {
const sudoOptions = { preserveEnv: true, logStream: null };
if (constants.TEST) sudoOptions.logStream = fs.createWriteStream('/dev/null'); // without this output is messed up, not sure why
gTasks[id] = shell.sudo('startTask', [ START_TASK_CMD, id, logFile, options.nice || 0, options.memoryLimit || 400 ], sudoOptions, async function (sudoError) {
gTasks[id] = shell.sudo('startTask', [ START_TASK_CMD, id, logFile, options.nice || 0, options.memoryLimit || 400, options.oomScoreAdjust || 0 ], sudoOptions, async function (sudoError) {
if (!gTasks[id]) return; // ignore task exit since we are shutting down. see stopAllTasks
const code = sudoError ? sudoError.code : 0;