Add log for failed uploads

Signed-off-by: alperozturk <alper_ozturk@proton.me>
This commit is contained in:
alperozturk 2024-04-12 09:53:47 +02:00 committed by Alper Öztürk
parent 80b40b947c
commit 7342b54f42

View file

@ -75,8 +75,10 @@ class FileUploadHelper {
) {
val failedUploads = uploadsStorageManager.failedUploads
if (failedUploads == null || failedUploads.isEmpty()) {
Log_OC.d(TAG, "Failed uploads are empty or null")
return
}
retryUploads(
uploadsStorageManager,
connectivityService,
@ -120,6 +122,7 @@ class FileUploadHelper {
val charging = batteryStatus.isCharging || batteryStatus.isFull
val isPowerSaving = powerManagementService.isPowerSavingEnabled
var uploadUser = Optional.empty<User>()
for (failedUpload in failedUploads) {
// 1. extract failed upload owner account and cache it between loops (expensive query)
if (!uploadUser.isPresent || !uploadUser.get().nameEquals(failedUpload.accountName)) {