phpvms/app/Cron/Nightly/ClearExpiredSimbrief.php
Nabeel S 9e5386264f
SimBrief integration #405 (#635)
* SimBrief integration #405

* Add briefing as API response; add acars_xml field #405
2020-03-23 09:31:35 -04:00

29 lines
582 B
PHP

<?php
namespace App\Cron\Nightly;
use App\Contracts\Listener;
use App\Events\CronNightly;
use App\Services\SimBriefService;
/**
* Clear any expired SimBrief flight briefs that aren't attached to a PIREP
*/
class ClearExpiredSimbrief extends Listener
{
private $simbriefSvc;
public function __construct(SimBriefService $simbriefSvc)
{
$this->simbriefSvc = $simbriefSvc;
}
/**
* @param \App\Events\CronNightly $event
*/
public function handle(CronNightly $event): void
{
$this->simbriefSvc->removeExpiredEntries();
}
}