0
0
mirror of https://github.com/naturalcrit/homebrewery.git synced 2025-12-24 22:52:40 +00:00

Allow cleaning function to work for a full minute

This commit is contained in:
Trevor Buckner
2019-07-01 13:16:26 -04:00
committed by GitHub
parent 6a57542216
commit df4bacf890

View File

@@ -32,7 +32,8 @@ const junkBrewQuery = HomebrewModel.find({
createdAt : {
$lt : Moment().subtract(30, 'days').toDate()
}
});
}).maxTimeMS(60000);
router.get('/admin/cleanup', mw.adminOnly, (req, res)=>{
junkBrewQuery.exec((err, objs)=>{
if(err) return res.status(500).send(err);
@@ -73,4 +74,4 @@ router.get('/admin', mw.adminOnly, (req, res)=>{
.catch((err)=>res.sendStatus(500));
});
module.exports = router;
module.exports = router;