Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 8a49743f authored by Akhil's avatar Akhil 🙂
Browse files

fix: add patch for fixing slow google import jobs

parent 23f4e37f
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -107,6 +107,7 @@ RUN patch -u ${BASE_DIR}/lib/private/Template/JSResourceLocator.php -i ${TMP_PAT
RUN patch -u ${BASE_DIR}/lib/private/L10N/Factory.php -i ${TMP_PATCH_DIR}/032-select-lang-from-session.patch
# UserConfigChangedEvent Ref: https://github.com/nextcloud/server/pull/42039
RUN cd ${BASE_DIR} && patch -p1 < ${TMP_PATCH_DIR}/036-user-config-change-event.patch
RUN patch -u ${BASE_DIR}/custom_apps/integration_google/lib/Service/GoogleDriveAPIService.php -i ${TMP_PATCH_DIR}/039-fix-slow-google-import-job.patch

RUN rm -rf ${TMP_PATCH_DIR}

+25 −0
Original line number Diff line number Diff line
From: Akhil <akhil@e.email>
Date: Thu, 24 Mar 2026 15:45:00 +0530
Subject: [PATCH] Fixes slow google imports jobs

This patch fixes slow google import jobs by fixing the download limit

--- ./custom_apps/integration_google/lib/Service/GoogleDriveAPIService.php	2026-03-05 17:29:38.731544684 +0530
+++ ./custom_apps/integration_google/lib/Service/GoogleDriveAPIService-new.php	2026-03-05 17:32:23.341024042 +0530
@@ -188,6 +188,7 @@
 		$targetPath = $targetPath ?: '/Google Drive';
 		$targetSharedPath = $this->config->getUserValue($userId, Application::APP_ID, 'drive_shared_with_me_output_dir', '/Google Drive/Shared with me');
 		$targetSharedPath = $targetSharedPath ?: '/Google Drive/Shared with me';
+		$downloadLimit = (int)$this->config->getUserValue($userId, Application::APP_ID, 'drive_imported_size', '0') + 500000000;
 
 		// check if target paths are suitable
 		$targetPath = $this->getNonSharedTargetPath($userId, $targetPath);
@@ -202,7 +203,7 @@
 			// import by batch of 500 Mo
 			$result = $this->importFiles(
 				$userId, $targetPath, $targetSharedPath,
-				500000000, $directoryProgress
+				$downloadLimit, $directoryProgress
 			);
 		} catch (Exception|Throwable $e) {
 			$result = [