1
0
şunun yansıması https://github.com/nextcloud/server.git eşitlendi 2024-08-27 05:55:24 +02:00

don't add multiple retry jobs

Signed-off-by: Bjoern Schiessle <bjoern@schiessle.org>
Bu işleme şunda yer alıyor:
Bjoern Schiessle 2017-04-27 16:45:13 +02:00 işlemeyi yapan: Morris Jobke
ebeveyn 4ec05ef050
işleme 7340d6a56c
Veri tabanında bu imza için bilinen anahtar bulunamadı
GPG Anahtar Kimliği: 9CE5ED29E7FCD38A

Dosyayı Görüntüle

@ -26,6 +26,7 @@ namespace OCA\LookupServerConnector\BackgroundJobs;
use OC\BackgroundJob\Job;
use OCP\BackgroundJob\IJobList;
use OCP\Http\Client\IClientService;
use OCP\ILogger;
class RetryJob extends Job {
/** @var IClientService */
@ -36,21 +37,28 @@ class RetryJob extends Job {
private $lookupServer = 'https://lookup.nextcloud.com/users';
/**
* @param IClientService|null $clientService
* @param IJobList|null $jobList
* @param IClientService $clientService
* @param IJobList $jobList
*/
public function __construct(IClientService $clientService = null,
IJobList $jobList = null) {
if($clientService !== null) {
$this->clientService = $clientService;
} else {
$this->clientService = \OC::$server->getHTTPClientService();
}
if($jobList !== null) {
$this->jobList = $jobList;
} else {
$this->jobList = \OC::$server->getJobList();
public function __construct(IClientService $clientService,
IJobList $jobList) {
$this->clientService = $clientService;
$this->jobList = $jobList;
}
/**
* run the job, then remove it from the jobList
*
* @param JobList $jobList
* @param ILogger $logger
*/
public function execute($jobList, ILogger $logger = null) {
if ($this->shouldRun($this->argument)) {
parent::execute($jobList, $logger);
$jobList->remove($this, $this->argument);
}
}
protected function run($argument) {