diff --git a/core/entity/job/schema.js b/core/entity/job/schema.js index b4baf4d2..b6ba916e 100644 --- a/core/entity/job/schema.js +++ b/core/entity/job/schema.js @@ -84,6 +84,15 @@ function BaseSchema (props) { dtask.approvers = data.task.approvers dtask.task_arguments = data.task.task_arguments dtask.output_parameters = data.task.output_parameters + dtask.execution_logging_enabled = data.task.execution_logging_enabled + + if (data.task.execution_logging_enabled) { + if (!data.task.execution_logging_basename) { + dtask.execution_logging_basename = data.task._id.toString() + } + dtask.execution_logging_dirname = data.task.execution_logging_dirname || null + } + data.task = dtask } } diff --git a/core/entity/job/script.js b/core/entity/job/script.js index 35acb687..7cf73cf3 100644 --- a/core/entity/job/script.js +++ b/core/entity/job/script.js @@ -7,7 +7,9 @@ const ScriptSchema = new BaseSchema({ script: { type: Object }, // this is embedded, not a reference env: { type: Object, default: () => { return {} }}, timeout: { type: Number }, - logging: { type: Boolean, default: false } + execution_logging_enabled: { type: Boolean, default: false }, + execution_logging_basename: { type: String, default: null }, + execution_logging_dirname: { type: String, default: null }, }) module.exports = ScriptSchema diff --git a/core/entity/task/script.js b/core/entity/task/script.js index 863fee5b..a88143bf 100644 --- a/core/entity/task/script.js +++ b/core/entity/task/script.js @@ -13,7 +13,9 @@ const ScriptSchema = new BaseSchema({ script_arguments: { type: Array }, // will be replaced with task_arguments in the future script: { type: ObjectId, ref: 'Script' }, env: { type: Object, default: () => { return {} }}, - logging: { type: Boolean, default: false } + execution_logging_enabled: { type: Boolean, default: false }, + execution_logging_basename: { type: String, default: null }, + execution_logging_dirname: { type: String, default: null }, }) module.exports = ScriptSchema