]> source.dussan.org Git - nextcloud-server.git/commitdiff
Use the configured lookup server 4788/head
authorJoas Schilling <coding@schilljs.com>
Wed, 10 May 2017 09:59:14 +0000 (11:59 +0200)
committerJoas Schilling <coding@schilljs.com>
Wed, 10 May 2017 10:06:09 +0000 (12:06 +0200)
Signed-off-by: Joas Schilling <coding@schilljs.com>
apps/lookup_server_connector/lib/BackgroundJobs/RetryJob.php

index 53c101cd933852f56babf0d6faa48f2efc280de7..3bc955f2fc1f89dff462891ca11c83a6c6d7788f 100644 (file)
@@ -26,6 +26,7 @@ use OC\BackgroundJob\Job;
 use OC\BackgroundJob\JobList;
 use OCP\BackgroundJob\IJobList;
 use OCP\Http\Client\IClientService;
+use OCP\IConfig;
 use OCP\ILogger;
 
 class RetryJob extends Job {
@@ -34,18 +35,24 @@ class RetryJob extends Job {
        /** @var IJobList */
        private $jobList;
        /** @var string */
-       private $lookupServer = 'https://lookup.nextcloud.com/users';
+       private $lookupServer;
        /** @var int how much time should be between two tries (10 minutes) */
        private $interval = 600;
 
        /**
         * @param IClientService $clientService
         * @param IJobList $jobList
+        * @param IConfig $config
         */
        public function __construct(IClientService $clientService,
-                                                               IJobList $jobList) {
+                                                               IJobList $jobList,
+                                                               IConfig $config) {
                $this->clientService = $clientService;
                $this->jobList = $jobList;
+
+               $this->lookupServer = $config->getSystemValue('lookup_server', 'https://lookup.nextcloud.com');
+               $this->lookupServer = rtrim($this->lookupServer, '/');
+               $this->lookupServer .= '/users';
        }
 
        /**