* SimBrief integration #405 * Add briefing as API response; add acars_xml field #405
This commit is contained in:
28
app/Cron/Nightly/ClearExpiredSimbrief.php
Normal file
28
app/Cron/Nightly/ClearExpiredSimbrief.php
Normal file
@@ -0,0 +1,28 @@
|
||||
<?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();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user