This commit is contained in:
2026-05-01 23:40:14 +08:00
commit b8f599a617
3867 changed files with 478663 additions and 0 deletions
+35
View File
@@ -0,0 +1,35 @@
<?php
namespace Webman\Console\Commands;
use Symfony\Component\Console\Attribute\AsCommand;
use Symfony\Component\Console\Command\Command;
use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Console\Output\OutputInterface;
use Symfony\Component\Console\Input\InputOption;
use Webman\Console\Commands\Concerns\ServiceCommandExecutor;
use Webman\Console\Messages;
use Webman\Console\Util;
#[AsCommand('start', 'Start worker in DEBUG mode. Use mode -d to start in DAEMON mode.')]
class StartCommand extends Command
{
use ServiceCommandExecutor;
protected function configure() : void
{
$messages = Util::selectLocaleMessages(Messages::getServiceMessages());
$this->setDescription($messages['start_desc']);
$this->addOption('daemon', 'd', InputOption::VALUE_NONE, $messages['daemon_option']);
}
/**
* @param InputInterface $input
* @param OutputInterface $output
* @return int
*/
protected function execute(InputInterface $input, OutputInterface $output): int
{
return $this->executeServiceCommand();
}
}