From a13e731d1c94e9543524783b1c1c6e536e58e09e Mon Sep 17 00:00:00 2001 From: KaiserBh Date: Wed, 10 Jan 2024 11:30:15 +1100 Subject: [PATCH] refactor(GoogleDrive): update backoff delay. Signed-off-by: KaiserBh --- .../tachiyomi/data/sync/service/GoogleDriveSyncService.kt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/src/main/java/eu/kanade/tachiyomi/data/sync/service/GoogleDriveSyncService.kt b/app/src/main/java/eu/kanade/tachiyomi/data/sync/service/GoogleDriveSyncService.kt index 2078699ad..e468764e1 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/data/sync/service/GoogleDriveSyncService.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/data/sync/service/GoogleDriveSyncService.kt @@ -71,7 +71,7 @@ class GoogleDriveSyncService(context: Context, json: Json, syncPreferences: Sync googleDriveService.refreshToken() val drive = googleDriveService.driveService ?: throw Exception("Google Drive service not initialized") - var backoff = 2000L + var backoff = 1000L while (true) { val lockFiles = findLockFile(drive) @@ -99,7 +99,7 @@ class GoogleDriveSyncService(context: Context, json: Json, syncPreferences: Sync else -> { logcat(LogPriority.DEBUG) { "Multiple lock files found, applying backoff" } delay(backoff) // Apply backoff strategy - backoff = (backoff * 2).coerceAtMost(32000L) + backoff = (backoff * 2).coerceAtMost(16000L) logcat(LogPriority.DEBUG) { "Backoff increased to $backoff milliseconds" } } }