summaryrefslogtreecommitdiffstats
path: root/apps/lookup_server_connector
diff options
context:
space:
mode:
authorJoas Schilling <coding@schilljs.com>2017-05-10 11:59:14 +0200
committerJoas Schilling <coding@schilljs.com>2017-05-10 12:06:09 +0200
commit5c20d2ca8ce8f7c6198704acd6037f2b62bcc180 (patch)
tree3957e1c750bfe0130691a3fc2db5eaae3759aeb4 /apps/lookup_server_connector
parent266a1e88fa72935725244ad41d8be60332cafef5 (diff)
downloadnextcloud-server-5c20d2ca8ce8f7c6198704acd6037f2b62bcc180.tar.gz
nextcloud-server-5c20d2ca8ce8f7c6198704acd6037f2b62bcc180.zip
Use the configured lookup server
Signed-off-by: Joas Schilling <coding@schilljs.com>
Diffstat (limited to 'apps/lookup_server_connector')
-rw-r--r--apps/lookup_server_connector/lib/BackgroundJobs/RetryJob.php11
1 files changed, 9 insertions, 2 deletions
diff --git a/apps/lookup_server_connector/lib/BackgroundJobs/RetryJob.php b/apps/lookup_server_connector/lib/BackgroundJobs/RetryJob.php
index 53c101cd933..3bc955f2fc1 100644
--- a/apps/lookup_server_connector/lib/BackgroundJobs/RetryJob.php
+++ b/apps/lookup_server_connector/lib/BackgroundJobs/RetryJob.php
@@ -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';
}
/**