Create New Item
Item Type
File
Folder
Item Name
Search file in folder and subfolders...
Are you sure want to rename?
gilour
/
laravel
/
horizon
/
src
/
Console
:
ClearMetricsCommand.php
Advanced Search
Upload
New Item
Settings
Back
Back Up
Advanced Editor
Save
<?php namespace Laravel\Horizon\Console; use Illuminate\Console\Command; use Laravel\Horizon\Contracts\MetricsRepository; use Symfony\Component\Console\Attribute\AsCommand; #[AsCommand(name: 'horizon:clear-metrics')] class ClearMetricsCommand extends Command { /** * The name and signature of the console command. * * @var string */ protected $signature = 'horizon:clear-metrics'; /** * The console command description. * * @var string */ protected $description = 'Delete metrics for all jobs and queues'; /** * Execute the console command. * * @param \Laravel\Horizon\Contracts\MetricsRepository $metrics * @return void */ public function handle(MetricsRepository $metrics) { $metrics->clear(); $this->components->info('Metrics cleared successfully.'); } }