mirror of
https://github.com/yu-i-i/overleaf-cep.git
synced 2026-11-15 06:33:55 +01:00
[DocArchiveManager] destroy in small batches
Also add settings options for PARALLEL_JOBS and DESTROY_BATCH_SIZE.
This commit is contained in:
@@ -57,11 +57,13 @@ module.exports = MongoManager = {
|
||||
if (!options.include_deleted) {
|
||||
query.deleted = { $ne: true }
|
||||
}
|
||||
db.docs
|
||||
.find(query, {
|
||||
projection: filter
|
||||
})
|
||||
.toArray(callback)
|
||||
const queryOptions = {
|
||||
projection: filter
|
||||
}
|
||||
if (options.limit) {
|
||||
queryOptions.limit = options.limit
|
||||
}
|
||||
db.docs.find(query, queryOptions).toArray(callback)
|
||||
},
|
||||
|
||||
getArchivedProjectDocs(project_id, callback) {
|
||||
|
||||
Reference in New Issue
Block a user