diff --git a/src/Bootstrap/Listeners/BeforeStartListener.php b/src/Bootstrap/Listeners/BeforeStartListener.php index b3d661bb..d6d0ba95 100644 --- a/src/Bootstrap/Listeners/BeforeStartListener.php +++ b/src/Bootstrap/Listeners/BeforeStartListener.php @@ -2,6 +2,7 @@ namespace Swoft\Process\Bootstrap\Listeners; +use Swoft\App; use Swoft\Bean\Annotation\BeforeStart; use Swoft\Bootstrap\Listeners\Interfaces\BeforeStartInterface; use Swoft\Bootstrap\Server\AbstractServer; @@ -36,7 +37,9 @@ private function addProcess(AbstractServer &$server) $name = $processInfo['name']; $boot = $processInfo['boot']; - if (!$boot) { + $processObject = App::getBean($name); + + if (!$processObject->check() || !$boot) { continue; }