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({
patternFile: {
type: mongoose.Schema.Types.ObjectId
},
compileFile: {
type: mongoose.Schema.Types.ObjectId
addonFileNames: {
type: Array,
default: []
},
cpuTimeLimit: {
type: Number,
......@@ -157,7 +158,7 @@ const TaskSchema = new mongoose.Schema({
},
useAddon: {
type: Boolean,
default: false
default: true
},
multiFile: {
type: Boolean,
......@@ -485,8 +486,8 @@ module.exports.setCompilerConfig = (id, compiler, config) => {
});
};
module.exports.setCompileFile = (id, compiler, compileFile) => {
return Task.findOneAndUpdate({_id: id}, {[`testerConfig.compilers.${compiler}.compileFile`]: compileFile});
module.exports.setAddonFileNames = (id, compiler, addonFileNames) => {
return Task.findOneAndUpdate({_id: id}, {[`testerConfig.compilers.${compiler}.addonFileNames`]: addonFileNames});
};
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