2FAuth/app/Listeners/ReleaseRadar.php

39 lines
813 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\Log;
class ReleaseRadar
{
/**
2022-11-22 15:15:52 +01:00
* @var ReleaseRadarService
*/
protected $releaseRadar;
2022-09-21 21:50:41 +02:00
/**
* Create the event listener.
*
2022-11-22 15:15:52 +01:00
* @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
}
/**
* 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
}
2022-11-22 15:15:52 +01:00
}