MCPcopy Create free account
hub / github.com/Rello/analytics / Hourly

Class Hourly

lib/BackgroundJob/Hourly.php:16–43  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

14use Psr\Log\LoggerInterface;
15
16class Hourly extends TimedJob
17{
18
19 private $logger;
20 private $DataloadService;
21
22 public function __construct(
23 ITimeFactory $time,
24 LoggerInterface $logger,
25 DataloadService $DataloadService
26 )
27 {
28 parent::__construct($time);
29 $this->setInterval((60 * 60) - 120); // 2 minutes because exact times would drift to the next cron execution
30 $this->logger = $logger;
31 $this->DataloadService = $DataloadService;
32 }
33
34 public function run($arguments)
35 {
36 try {
37 $this->DataloadService->executeBySchedule('h');
38 } catch (\Exception $e) {
39 // no action
40 }
41 }
42
43}

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected