Commit 3ac773da authored by Antony Orlovsky's avatar Antony Orlovsky

Merge branch 'develop' into 'develop'

Updated task schema

See merge request !6
parents e02fcc21 5d1f8a5c
...@@ -80,8 +80,9 @@ const TaskSchema = new mongoose.Schema({ ...@@ -80,8 +80,9 @@ const TaskSchema = new mongoose.Schema({
patternFile: { patternFile: {
type: mongoose.Schema.Types.ObjectId type: mongoose.Schema.Types.ObjectId
}, },
compileFile: { addonFileNames: {
type: mongoose.Schema.Types.ObjectId type: Array,
default: []
}, },
cpuTimeLimit: { cpuTimeLimit: {
type: Number, type: Number,
...@@ -157,7 +158,7 @@ const TaskSchema = new mongoose.Schema({ ...@@ -157,7 +158,7 @@ const TaskSchema = new mongoose.Schema({
}, },
useAddon: { useAddon: {
type: Boolean, type: Boolean,
default: false default: true
}, },
multiFile: { multiFile: {
type: Boolean, type: Boolean,
...@@ -485,8 +486,8 @@ module.exports.setCompilerConfig = (id, compiler, config) => { ...@@ -485,8 +486,8 @@ module.exports.setCompilerConfig = (id, compiler, config) => {
}); });
}; };
module.exports.setCompileFile = (id, compiler, compileFile) => { module.exports.setAddonFileNames = (id, compiler, addonFileNames) => {
return Task.findOneAndUpdate({_id: id}, {[`testerConfig.compilers.${compiler}.compileFile`]: compileFile}); return Task.findOneAndUpdate({_id: id}, {[`testerConfig.compilers.${compiler}.addonFileNames`]: addonFileNames});
}; };
module.exports.setPatternFile = (id, compiler, patternFile) => { module.exports.setPatternFile = (id, compiler, patternFile) => {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment