diff options
Diffstat (limited to 'apps/lookup_server_connector/lib/BackgroundJobs/RetryJob.php')
-rw-r--r-- | apps/lookup_server_connector/lib/BackgroundJobs/RetryJob.php | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/apps/lookup_server_connector/lib/BackgroundJobs/RetryJob.php b/apps/lookup_server_connector/lib/BackgroundJobs/RetryJob.php index c0fba230a26..5a7212a6522 100644 --- a/apps/lookup_server_connector/lib/BackgroundJobs/RetryJob.php +++ b/apps/lookup_server_connector/lib/BackgroundJobs/RetryJob.php @@ -50,9 +50,15 @@ class RetryJob extends Job { $this->clientService = $clientService; $this->jobList = $jobList; + if ($config->getSystemValue('has_internet_connection', true) === false) { + return; + } + $this->lookupServer = $config->getSystemValue('lookup_server', 'https://lookup.nextcloud.com'); - $this->lookupServer = rtrim($this->lookupServer, '/'); - $this->lookupServer .= '/users'; + if (!empty($this->lookupServer)) { + $this->lookupServer = rtrim($this->lookupServer, '/'); + $this->lookupServer .= '/users'; + } } /** @@ -69,7 +75,7 @@ class RetryJob extends Job { } protected function run($argument) { - if($argument['retryNo'] === 5) { + if ($argument['retryNo'] === 5 || empty($this->lookupServer)) { return; } |