logStream is not used anymore
This commit is contained in:
@@ -44,10 +44,8 @@ exports = module.exports = {
|
||||
|
||||
const assert = require('assert'),
|
||||
BoxError = require('./boxerror.js'),
|
||||
constants = require('./constants.js'),
|
||||
database = require('./database.js'),
|
||||
debug = require('debug')('box:tasks'),
|
||||
fs = require('fs'),
|
||||
logs = require('./logs.js'),
|
||||
path = require('path'),
|
||||
paths = require('./paths.js'),
|
||||
@@ -55,7 +53,7 @@ const assert = require('assert'),
|
||||
shell = require('./shell.js')('tasks'),
|
||||
_ = require('./underscore.js');
|
||||
|
||||
let gTasks = {}; // indexed by task id
|
||||
let gTasks = {}; // holds AbortControllers indexed by task id
|
||||
|
||||
const START_TASK_CMD = path.join(__dirname, 'scripts/starttask.sh');
|
||||
const STOP_TASK_CMD = path.join(__dirname, 'scripts/stoptask.sh');
|
||||
@@ -167,8 +165,7 @@ async function startTask(id, options) {
|
||||
|
||||
let killTimerId = null, timedOut = false;
|
||||
|
||||
const sudoOptions = { preserveEnv: true, logStream: null };
|
||||
if (constants.TEST) sudoOptions.logStream = fs.createWriteStream('/dev/null'); // without this output is messed up, not sure why
|
||||
const sudoOptions = { preserveEnv: true };
|
||||
|
||||
const p = new Promise((resolve, reject) => {
|
||||
gTasks[id] = shell.sudoCallback([ START_TASK_CMD, id, logFile, options.nice || 0, options.memoryLimit || 400, options.oomScoreAdjust || 0 ], sudoOptions, async function (sudoError) {
|
||||
|
||||
Reference in New Issue
Block a user