Update retry behavior for backed-up attachments
This commit is contained in:
parent
ac89fe894a
commit
a7e22b14b3
5 changed files with 50 additions and 2 deletions
|
@ -599,6 +599,7 @@ export const DataWriter: ServerWritableInterface = {
|
|||
saveAttachmentDownloadJob,
|
||||
saveAttachmentDownloadJobs,
|
||||
resetAttachmentDownloadActive,
|
||||
resetBackupAttachmentDownloadJobsRetryAfter,
|
||||
removeAttachmentDownloadJob,
|
||||
removeAttachmentDownloadJobsForMessage,
|
||||
removeAllBackupAttachmentDownloadJobs,
|
||||
|
@ -5746,6 +5747,16 @@ function resetAttachmentDownloadActive(db: WritableDB): void {
|
|||
).run();
|
||||
}
|
||||
|
||||
function resetBackupAttachmentDownloadJobsRetryAfter(db: WritableDB): void {
|
||||
db.prepare(
|
||||
`
|
||||
UPDATE attachment_downloads
|
||||
SET retryAfter = NULL
|
||||
WHERE originalSource = 'backup_import'
|
||||
`
|
||||
).run();
|
||||
}
|
||||
|
||||
function removeAttachmentDownloadJob(
|
||||
db: WritableDB,
|
||||
job: Pick<
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue