This commit is contained in:
as2252258@163.com
2021-04-09 02:12:54 +08:00
parent 54bc7b0b55
commit 7facca27c1
2 changed files with 4 additions and 3 deletions
+4 -1
View File
@@ -7,6 +7,7 @@ namespace Console;
use Exception; use Exception;
use Snowflake\Abstracts\Component; use Snowflake\Abstracts\Component;
use Snowflake\Abstracts\Input; use Snowflake\Abstracts\Input;
use Snowflake\Event;
use Snowflake\Snowflake; use Snowflake\Snowflake;
/** /**
@@ -56,7 +57,9 @@ abstract class AbstractConsole extends Component
*/ */
public function execCommand(Command $command): mixed public function execCommand(Command $command): mixed
{ {
return $command->onHandler($this->parameters); fire(Event::SERVER_BEFORE_START);
return $command->onHandler($this->parameters);
} }
/** /**
-2
View File
@@ -135,8 +135,6 @@ class Application extends BaseApplication
public function start(Input $argv): void public function start(Input $argv): void
{ {
try { try {
fire(Event::SERVER_BEFORE_START);
/** @var Console $manager */ /** @var Console $manager */
$manager = Snowflake::app()->get('console'); $manager = Snowflake::app()->get('console');
$manager->register(Runtime::class); $manager->register(Runtime::class);