@@ -28,32 +28,32 @@ |
||
28 | 28 | |
29 | 29 | class SyncJob extends TimedJob { |
30 | 30 | |
31 | - /** @var SyncFederationAddressBooks */ |
|
32 | - protected $syncService; |
|
31 | + /** @var SyncFederationAddressBooks */ |
|
32 | + protected $syncService; |
|
33 | 33 | |
34 | - /** @var ILogger */ |
|
35 | - protected $logger; |
|
34 | + /** @var ILogger */ |
|
35 | + protected $logger; |
|
36 | 36 | |
37 | - /** |
|
38 | - * @param SyncFederationAddressBooks $syncService |
|
39 | - * @param ILogger $logger |
|
40 | - */ |
|
41 | - public function __construct(SyncFederationAddressBooks $syncService, ILogger $logger) { |
|
42 | - // Run once a day |
|
43 | - $this->setInterval(24 * 60 * 60); |
|
44 | - $this->syncService = $syncService; |
|
45 | - $this->logger = $logger; |
|
46 | - } |
|
37 | + /** |
|
38 | + * @param SyncFederationAddressBooks $syncService |
|
39 | + * @param ILogger $logger |
|
40 | + */ |
|
41 | + public function __construct(SyncFederationAddressBooks $syncService, ILogger $logger) { |
|
42 | + // Run once a day |
|
43 | + $this->setInterval(24 * 60 * 60); |
|
44 | + $this->syncService = $syncService; |
|
45 | + $this->logger = $logger; |
|
46 | + } |
|
47 | 47 | |
48 | - protected function run($argument) { |
|
49 | - $this->syncService->syncThemAll(function($url, $ex) { |
|
50 | - if ($ex instanceof \Exception) { |
|
51 | - $this->logger->logException($ex, [ |
|
52 | - 'message' => "Error while syncing $url.", |
|
53 | - 'level' => ILogger::INFO, |
|
54 | - 'app' => 'fed-sync', |
|
55 | - ]); |
|
56 | - } |
|
57 | - }); |
|
58 | - } |
|
48 | + protected function run($argument) { |
|
49 | + $this->syncService->syncThemAll(function($url, $ex) { |
|
50 | + if ($ex instanceof \Exception) { |
|
51 | + $this->logger->logException($ex, [ |
|
52 | + 'message' => "Error while syncing $url.", |
|
53 | + 'level' => ILogger::INFO, |
|
54 | + 'app' => 'fed-sync', |
|
55 | + ]); |
|
56 | + } |
|
57 | + }); |
|
58 | + } |
|
59 | 59 | } |