Do not run reconciliation while there are still uploads in progress.

This commit is contained in:
Greyson Parrelli
2026-01-09 13:17:48 -05:00
committed by Michelle Tang
parent 73ea50d162
commit b06f0bba61

View File

@@ -126,6 +126,11 @@ class ArchiveAttachmentReconciliationJob private constructor(
return Result.success()
}
if (!AppDependencies.jobManager.areQueuesEmpty(UploadAttachmentToArchiveJob.QUEUES)) {
Log.i(TAG, "There are still uploads in progress. Retrying later.")
return Result.retry(defaultBackoff())
}
// It's possible a new backup could be started while this job is running. If we don't keep a consistent view of the snapshot version, the logic
// we use to determine which attachments need to be re-uploaded will possibly result in us unnecessarily re-uploading attachments.
snapshotVersion = snapshotVersion ?: SignalDatabase.backupMediaSnapshots.getCurrentSnapshotVersion()