Replaced capped collection with 1-hour expiry index

This commit is contained in:
Michael Schmatz 2014-02-08 14:21:37 -08:00
parent aabc8324c1
commit 8c2926c300

View file

@ -1,6 +1,7 @@
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}
@ -8,5 +9,5 @@ ScoringTaskSchema = new mongoose.Schema(
sessions: {type: Array, default: []}
)
ScoringTaskSchema.set 'capped', 104857600 #100MB capped collection
#ScoringTaskSchema.set 'capped', 104857600 #100MB capped collection
module.exports = mongoose.model('scoringTask', ScoringTaskSchema)