From 7d69ff05c4563607b1ad18e27f18d8f5c3bb111d Mon Sep 17 00:00:00 2001 From: Vincent Petry Date: Wed, 29 Mar 2017 08:06:02 +0200 Subject: [PATCH] Enable GDrive retries and backoff for rate limit Makes it possible to still get successful calls after delayed retries when hitting the API limits. --- apps/files_external/lib/Lib/Storage/Google.php | 1 + 1 file changed, 1 insertion(+) diff --git a/apps/files_external/lib/Lib/Storage/Google.php b/apps/files_external/lib/Lib/Storage/Google.php index 0b617aafe9d1..b3cc8c4c3a0f 100644 --- a/apps/files_external/lib/Lib/Storage/Google.php +++ b/apps/files_external/lib/Lib/Storage/Google.php @@ -75,6 +75,7 @@ public function __construct($params) { if (!function_exists('curl_version') || !function_exists('curl_exec')) { $this->client->setClassConfig("Google_Http_Request", "disable_gzip", true); } + $this->client->setClassConfig('Google_Task_Runner', 'retries', 5); // note: API connection is lazy $this->service = new \Google_Service_Drive($this->client); $token = json_decode($params['token'], true);