Batch attachment download jobs
This commit is contained in:
parent
1b8be6a3d1
commit
86026bd66a
6 changed files with 54 additions and 7 deletions
|
@ -486,6 +486,7 @@ export const DataWriter: ServerWritableInterface = {
|
|||
|
||||
getNextAttachmentDownloadJobs,
|
||||
saveAttachmentDownloadJob,
|
||||
saveAttachmentDownloadJobs,
|
||||
resetAttachmentDownloadActive,
|
||||
removeAttachmentDownloadJob,
|
||||
removeAllBackupAttachmentDownloadJobs,
|
||||
|
@ -5000,6 +5001,17 @@ function getNextAttachmentDownloadJobs(
|
|||
}
|
||||
}
|
||||
|
||||
function saveAttachmentDownloadJobs(
|
||||
db: WritableDB,
|
||||
jobs: Array<AttachmentDownloadJobType>
|
||||
): void {
|
||||
db.transaction(() => {
|
||||
for (const job of jobs) {
|
||||
saveAttachmentDownloadJob(db, job);
|
||||
}
|
||||
})();
|
||||
}
|
||||
|
||||
function saveAttachmentDownloadJob(
|
||||
db: WritableDB,
|
||||
job: AttachmentDownloadJobType
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue