mirror of
https://github.com/ProtonDriveApps/sdk.git
synced 2026-05-15 09:50:35 +00:00
Add info log for uploader and downloader
This commit is contained in:
@@ -37,7 +37,6 @@ import proton.drive.sdk.driveClientGetNodeRequest
|
||||
import proton.drive.sdk.driveClientRenameRequest
|
||||
import proton.drive.sdk.driveClientRestoreNodesRequest
|
||||
import proton.drive.sdk.driveClientTrashNodesRequest
|
||||
import proton.drive.sdk.drivePhotosClientGetNodeRequest
|
||||
import java.time.Instant
|
||||
import kotlin.time.Duration
|
||||
|
||||
@@ -235,6 +234,7 @@ internal class InteropProtonDriveClient internal constructor(
|
||||
revisionUid: RevisionUid,
|
||||
timeout: Duration,
|
||||
): Downloader = withTimeout(timeout) {
|
||||
log(INFO, "downloader")
|
||||
cancellationCoroutineScope { source ->
|
||||
factory(JniFileDownloader()) {
|
||||
FileDownloader(
|
||||
@@ -255,6 +255,7 @@ internal class InteropProtonDriveClient internal constructor(
|
||||
request: FileUploaderRequest,
|
||||
timeout: Duration,
|
||||
): Uploader = withTimeout(timeout) {
|
||||
log(INFO, "fileUploader")
|
||||
cancellationCoroutineScope { source ->
|
||||
JniFileUploader().run {
|
||||
FileUploader(
|
||||
@@ -275,6 +276,7 @@ internal class InteropProtonDriveClient internal constructor(
|
||||
request: FileRevisionUploaderRequest,
|
||||
timeout: Duration,
|
||||
): Uploader = withTimeout(timeout) {
|
||||
log(INFO, "fileRevisionUploader")
|
||||
cancellationCoroutineScope { source ->
|
||||
JniFileUploader().run {
|
||||
FileUploader(
|
||||
|
||||
@@ -77,7 +77,9 @@ internal class InteropProtonPhotosClient internal constructor(
|
||||
}
|
||||
}
|
||||
|
||||
override suspend fun getNode(nodeUid: NodeUid): NodeResult? = cancellationCoroutineScope { source ->
|
||||
override suspend fun getNode(
|
||||
nodeUid: NodeUid,
|
||||
): NodeResult? = cancellationCoroutineScope { source ->
|
||||
log(DEBUG, "getNode")
|
||||
bridge.getNode(
|
||||
drivePhotosClientGetNodeRequest {
|
||||
@@ -158,6 +160,7 @@ internal class InteropProtonPhotosClient internal constructor(
|
||||
photoUid: NodeUid,
|
||||
timeout: Duration,
|
||||
): Downloader = withTimeout(timeout) {
|
||||
log(INFO, "downloader")
|
||||
cancellationCoroutineScope { source ->
|
||||
factory(JniPhotosDownloader()) {
|
||||
PhotosDownloader(
|
||||
@@ -178,6 +181,7 @@ internal class InteropProtonPhotosClient internal constructor(
|
||||
request: PhotosUploaderRequest,
|
||||
timeout: Duration,
|
||||
): Uploader = withTimeout(timeout) {
|
||||
log(INFO, "photosUploader")
|
||||
cancellationCoroutineScope { source ->
|
||||
JniPhotosUploader().run {
|
||||
PhotosUploader(
|
||||
|
||||
Reference in New Issue
Block a user