Файл: vendor/laravel/framework/src/Illuminate/Queue/Console/RestartCommand.php
Строк: 61
<?php
namespace IlluminateQueueConsole;
use IlluminateConsoleCommand;
use IlluminateContractsCacheRepository as Cache;
use IlluminateSupportInteractsWithTime;
use SymfonyComponentConsoleAttributeAsCommand;
#[AsCommand(name: 'queue:restart')]
class RestartCommand extends Command
{
use InteractsWithTime;
/**
* The console command name.
*
* @var string
*/
protected $name = 'queue:restart';
/**
* The console command description.
*
* @var string
*/
protected $description = 'Restart queue worker daemons after their current job';
/**
* The cache store implementation.
*
* @var IlluminateContractsCacheRepository
*/
protected $cache;
/**
* Create a new queue restart command.
*
* @param IlluminateContractsCacheRepository $cache
* @return void
*/
public function __construct(Cache $cache)
{
parent::__construct();
$this->cache = $cache;
}
/**
* Execute the console command.
*
* @return void
*/
public function handle()
{
$this->cache->forever('illuminate:queue:restart', $this->currentTime());
$this->components->info('Broadcasting queue restart signal.');
}
}