Limiting on how much you can shuffle

This commit is contained in:
Kasper Rynning-Tønnesen
2018-03-01 15:20:26 +01:00
parent adc1b2bf31
commit 7aa4b2d22a
4 changed files with 134 additions and 67 deletions

View File

@@ -8,6 +8,7 @@ try {
}
var mongojs = require('mongojs');
var db = mongojs('mongodb://' + mongo_config.host + '/' + mongo_config.config);
var ObjectId = mongojs.ObjectId;
db.collection("chat_logs").createIndex({ "createdAt": 1 }, { expireAfterSeconds: 600 });
db.collection("timeout_api").createIndex({ "createdAt": 1 }, { expireAfterSeconds: 5 });