quak backup works on up to the content pool's limit of originals at once (closes #182) #192

Merged
clawbot merged 10 commits from issue-182-parallel-backup into next 2026-10-14 09:07:00 +02:00
Showing only changes of commit 65b0de4694 - Show all commits
+8
View File
@@ -972,6 +972,14 @@ export const runBackup = async (
"open the library with one)",
);
}
// As `BoundedPool` does. A limit below 1, or one that is not a number,
// would back up no original and end with no error.
const { contentConcurrency } = lib;
if (!Number.isInteger(contentConcurrency) || contentConcurrency < 1) {
throw new RangeError(
`contentConcurrency must be a positive integer, got ${contentConcurrency}`,
);
}
if (opts.lock) {
return runLockedBackup(lib, opts, downloadDirectory, opts.lock);
}