mirror of
https://github.com/codeninjasllc/codecombat.git
synced 2025-03-13 22:49:51 -04:00
Replaced capped collection with 1-hour expiry index
This commit is contained in:
parent
aabc8324c1
commit
8c2926c300
1 changed files with 2 additions and 1 deletions
|
@ -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)
|
||||
|
|
Loading…
Reference in a new issue