mirror of
https://github.com/ether/etherpad-lite.git
synced 2025-04-21 16:06:16 -04:00
Load revisions for cleanup in parallel
This commit is contained in:
parent
967d430c32
commit
1f80a3246a
1 changed files with 3 additions and 2 deletions
|
@ -61,9 +61,10 @@ exports.deleteRevisions = async (padId: string, keepRevisions: number): Promise<
|
|||
|
||||
const revisions: Revision[] = [];
|
||||
|
||||
for (let rev = cleanupUntilRevision; rev <= pad.head; ++rev) {
|
||||
await promises.timesLimit(keepRevisions + 1, 500, async (i: number) => {
|
||||
const rev = i + cleanupUntilRevision
|
||||
revisions[rev] = await pad.getRevision(rev)
|
||||
}
|
||||
});
|
||||
|
||||
logger.debug('Loaded revisions: ', revisions.length)
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue