Return args as part of task.get

the ui needs this to repair any failed app task
This commit is contained in:
Girish Ramakrishnan
2019-11-23 18:06:31 -08:00
parent f543b98764
commit 6774514bd2
3 changed files with 4 additions and 11 deletions

View File

@@ -14,8 +14,6 @@ exports = module.exports = {
stopTask: stopTask,
stopAllTasks: stopAllTasks,
removePrivateFields: removePrivateFields,
// task types. if you add a task here, fill up the function table in taskworker
TASK_APP: 'app',
TASK_BACKUP: 'backup',
@@ -269,9 +267,3 @@ function getLogs(taskId, options, callback) {
callback(null, transformStream);
}
// removes all fields that are strictly private and should never be returned by API calls
function removePrivateFields(task) {
var result = _.pick(task, 'id', 'type', 'percent', 'message', 'error', 'active', 'creationTime', 'result', 'ts', 'success');
return result;
}