mirror of
https://github.com/nextcloud/android.git
synced 2024-11-26 15:15:51 +03:00
FilesUploadWorker: add some more logging
Signed-off-by: Álvaro Brey <alvaro.brey@nextcloud.com>
This commit is contained in:
parent
bbb55b7f28
commit
a4adf83efe
1 changed files with 3 additions and 0 deletions
|
@ -74,6 +74,7 @@ class FilesUploadWorker(
|
|||
override fun doWork(): Result {
|
||||
val accountName = inputData.getString(ACCOUNT)
|
||||
if (accountName.isNullOrEmpty()) {
|
||||
Log_OC.w(TAG, "User was null for file upload worker")
|
||||
return Result.failure() // user account is needed
|
||||
}
|
||||
|
||||
|
@ -81,11 +82,13 @@ class FilesUploadWorker(
|
|||
var currentAndPendingUploadsForAccount =
|
||||
uploadsStorageManager.getCurrentAndPendingUploadsForAccount(accountName)
|
||||
while (currentAndPendingUploadsForAccount.isNotEmpty()) {
|
||||
Log_OC.d(TAG, "Handling ${currentAndPendingUploadsForAccount.size} uploads for account $accountName")
|
||||
handlePendingUploads(currentAndPendingUploadsForAccount, accountName)
|
||||
currentAndPendingUploadsForAccount =
|
||||
uploadsStorageManager.getCurrentAndPendingUploadsForAccount(accountName)
|
||||
}
|
||||
|
||||
Log_OC.d(TAG, "No more pending uploads for account $accountName, stopping work")
|
||||
return Result.success()
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue