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:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user