2FAuth/app/Listeners/ReleaseRadar.php

42 lines
872 B
PHP
Raw Normal View History

2022-09-21 21:50:41 +02:00
<?php
namespace App\Listeners;
use App\Events\ScanForNewReleaseCalled;
2022-09-21 21:50:41 +02:00
use App\Services\ReleaseRadarService;
use Illuminate\Support\Facades\App;
use Illuminate\Support\Facades\Log;
class ReleaseRadar
{
/**
* @var ReleaseRadarService $releaseRadar
*/
protected $releaseRadar;
2022-09-21 21:50:41 +02:00
/**
* Create the event listener.
*
* @param \App\Services\ReleaseRadarService $releaseRadar
2022-09-21 21:50:41 +02:00
*
* @return void
*/
public function __construct(ReleaseRadarService $releaseRadar)
2022-09-21 21:50:41 +02:00
{
$this->releaseRadar = $releaseRadar;
2022-09-21 21:50:41 +02:00
}
2022-09-21 21:50:41 +02:00
/**
* Handle the event.
*
* @param \App\Events\ScanForNewReleaseCalled $event
2022-09-21 21:50:41 +02:00
* @return void
*/
public function handle(ScanForNewReleaseCalled $event)
2022-09-21 21:50:41 +02:00
{
$this->releaseRadar->scheduledScan();
Log::info('Scheduled release scan complete');
2022-09-21 21:50:41 +02:00
}
}