codecombat/server/queues/task/ScoringTask.coffee
Matt Lott 3d32c8a5e7 Document missing database schema indexes
These indexes are on the production database but not set in our
mongoose schemas.
2015-01-27 10:02:51 -08:00

14 lines
507 B
CoffeeScript

mongoose = require 'mongoose'
ScoringTaskSchema = new mongoose.Schema(
createdAt: {type: Date, expires: 3600} #expire document 1 hour after they are created
calculator: {type: mongoose.Schema.Types.ObjectId}
sentDate: {type: Number}
messageIdentifierString: {type: String}
calculationTimeMS: {type: Number, default: 0}
sessions: {type: Array, default: []}
)
ScoringTaskSchema.index({createdAt: 1}, {expireAfterSeconds: 3600})
module.exports = mongoose.model('scoringTask', ScoringTaskSchema)