Merge pull request #3596 from overleaf/ho-read-pref-secondary

add .setReadPreference('secondary') to slow queries

GitOrigin-RevId: 828f9a417a43237b3de5609ee9b12b30a68fc167
This commit is contained in:
Henry Oswald
2021-01-26 16:02:13 +00:00
committed by Copybot
parent d012954feb
commit 2339884bd5
2 changed files with 4 additions and 1 deletions
@@ -72,6 +72,7 @@ module.exports = InactiveProjectManager = {
.select('_id')
.sort({ _id: 1 })
.limit(limit)
.read('secondary')
.exec(function(err, projects) {
if (err != null) {
logger.err({ err }, 'could not get projects for deactivating')