mirror of
https://github.com/signalapp/Signal-Android.git
synced 2026-10-01 17:31:14 +01:00
Don't mark attachments archived when a copy to the archive CDN fails.
This commit is contained in:
committed by
Alex Hart
parent
635c997516
commit
0030366ade
@@ -4564,7 +4564,7 @@ class AttachmentTable(
|
||||
appendLine("Media names with thumbnails count: $mediaNamesWithThumbnailsCount")
|
||||
appendLine("Pending attachment upload bytes: $pendingAttachmentUploadBytes")
|
||||
appendLine("Last snapshot full-size count: $lastSnapshotFullSizeCount")
|
||||
appendLine("Last snapshot thumbnail count : $lastSnapshotFullSizeCount")
|
||||
appendLine("Last snapshot thumbnail count : $lastSnapshotThumbnailCount")
|
||||
appendLine("Uploaded attachment bytes: $uploadedAttachmentBytes")
|
||||
appendLine("Uploaded thumbnail bytes: $uploadedThumbnailBytes")
|
||||
appendLine("Total upload count: $totalUploadCount")
|
||||
@@ -4592,7 +4592,7 @@ class AttachmentTable(
|
||||
appendLine("Total unique data files: $totalUniqueDataFiles")
|
||||
appendLine("Total unique media names: $totalUniqueMediaNames")
|
||||
appendLine("Last snapshot full-size count: $lastSnapshotFullSizeCount")
|
||||
appendLine("Last snapshot thumbnail count : $lastSnapshotFullSizeCount")
|
||||
appendLine("Last snapshot thumbnail count : $lastSnapshotThumbnailCount")
|
||||
appendLine("Pending attachment upload bytes: $pendingAttachmentUploadBytes")
|
||||
|
||||
if (archiveStatusMediaNameCounts.isNotEmpty()) {
|
||||
|
||||
@@ -187,13 +187,15 @@ class CopyAttachmentToArchiveJob private constructor(private val attachmentId: A
|
||||
Log.w(TAG, "[$attachmentId]$mediaIdLog Something is invalid about our request. Possibly the length. Scheduling a re-upload.")
|
||||
setArchiveTransferStateWithDelayedNotification(attachmentId, AttachmentTable.ArchiveTransferState.NONE)
|
||||
AppDependencies.jobManager.add(UploadAttachmentToArchiveJob(attachmentId, canReuseUpload = false))
|
||||
Result.success()
|
||||
// Returning immediately to avoid marking the attachment as finished.
|
||||
return Result.success()
|
||||
}
|
||||
is ArchiveError.CopyMediaError.SourceNotFound -> {
|
||||
Log.w(TAG, "[$attachmentId]$mediaIdLog The attachment no longer exists on the transit tier. Scheduling a re-upload.")
|
||||
setArchiveTransferStateWithDelayedNotification(attachmentId, AttachmentTable.ArchiveTransferState.NONE)
|
||||
AppDependencies.jobManager.add(UploadAttachmentToArchiveJob(attachmentId, canReuseUpload = false))
|
||||
Result.success()
|
||||
// Returning immediately to avoid marking the attachment as finished.
|
||||
return Result.success()
|
||||
}
|
||||
is ArchiveError.CopyMediaError.OutOfRemoteSpace -> {
|
||||
Log.w(TAG, "[$attachmentId]$mediaIdLog Insufficient storage space! Can't upload!")
|
||||
|
||||
Reference in New Issue
Block a user