This repository has been archived on 2025-05-04. You can view files and clone it, but you cannot make any changes to it's state, such as pushing and creating new issues, pull requests or comments.
codecombat/server/queues/task/ScoringTask.coffee

15 lines
507 B
CoffeeScript
Raw Normal View History

2014-07-01 10:16:26 +08:00
mongoose = require 'mongoose'
2014-02-07 15:52:24 -08:00
ScoringTaskSchema = new mongoose.Schema(
createdAt: {type: Date, expires: 3600} #expire document 1 hour after they are created
2014-07-01 10:16:26 +08:00
calculator: {type: mongoose.Schema.Types.ObjectId}
sentDate: {type: Number}
2014-02-07 15:52:24 -08:00
messageIdentifierString: {type: String}
calculationTimeMS: {type: Number, default: 0}
sessions: {type: Array, default: []}
)
ScoringTaskSchema.index({createdAt: 1}, {expireAfterSeconds: 3600})
2014-02-07 15:52:24 -08:00
module.exports = mongoose.model('scoringTask', ScoringTaskSchema)