codecombat/server/queues/task/ScoringTask.coffee

14 lines
506 B
CoffeeScript
Raw Normal View History

2014-02-07 18:52:24 -05:00
mongoose = require('mongoose')
ScoringTaskSchema = new mongoose.Schema(
createdAt: {type: Date, expires: 3600} #expire document 1 hour after they are created
2014-02-07 18:52:24 -05:00
calculator: {type:mongoose.Schema.Types.ObjectId}
sentDate: {type: Number}
2014-02-07 18:52:24 -05:00
messageIdentifierString: {type: String}
calculationTimeMS: {type: Number, default: 0}
sessions: {type: Array, default: []}
)
#ScoringTaskSchema.set 'capped', 104857600 #100MB capped collection
2014-02-07 18:52:24 -05:00
module.exports = mongoose.model('scoringTask', ScoringTaskSchema)