[DocArchiveManager] destroy in small batches

Also add settings options for PARALLEL_JOBS and DESTROY_BATCH_SIZE.
This commit is contained in:
Jakob Ackermann
2021-04-16 09:51:41 +01:00
parent ccf1f502e2
commit 3f94dd4dbf
4 changed files with 27 additions and 13 deletions
@@ -518,6 +518,11 @@ describe('DocArchiveManager', function () {
})
describe('destroyAllDocs', function () {
beforeEach(function () {
MongoManager.promises.getProjectsDocs.onCall(0).resolves(mongoDocs)
MongoManager.promises.getProjectsDocs.onCall(1).resolves([])
})
it('should resolve with valid arguments', async function () {
await expect(DocArchiveManager.promises.destroyAllDocs(projectId)).to
.eventually.be.fulfilled