/
githubmirror
/
framework
Обзор
Документация
Войти
/
githubmirror
/
framework
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
13.x
src/Illuminate/Console/Scheduling/ScheduleClearCacheCommand.php
49 строк
1 KB
Lucas Michot
[13.x] Consolidate Artisan command $name/getArguments()/getOptions() into $signature (#60926)
30 июл 2026, 23:53
Не верифицирован
30 июл 2026, 23:53
08bb3da
Код
Авторство
О чём код?
<?php namespace Illuminate\Console\Scheduling; use Illuminate\Console\Command; use Symfony\Component\Console\Attribute\AsCommand; #[AsCommand(name: 'schedule:clear-cache')] class ScheduleClearCacheCommand extends Command { /** * The name and signature of the console command. * * @var string */ protected $signature = 'schedule:clear-cache'; /** * The console command description. * * @var string */ protected $description = 'Delete the cached mutex files created by scheduler'; /** * Execute the console command. * * @param \Illuminate\Console\Scheduling\Schedule $schedule * @return void */ public function handle(Schedule $schedule) { $mutexCleared = false; foreach ($schedule->events() as $event) { if ($event->mutex->exists($event)) { $this->components->info(sprintf('Deleting mutex for [%s]', $event->command)); $event->mutex->forget($event); $mutexCleared = true; } } if (! $mutexCleared) { $this->components->info('No mutex files were found.'); } } }