This commit is contained in:
xl
2024-08-29 17:01:07 +08:00
parent b14b18040b
commit 917e82064a
8 changed files with 34 additions and 75 deletions
+1 -15
View File
@@ -44,20 +44,6 @@ abstract class BaseProcess implements OnProcessInterface
protected bool $enable_queue = false;
/**
* @var StdoutLogger
*/
#[Container(LoggerInterface::class)]
public StdoutLogger $logger;
/**
* @var \Kiri\Di\Container
*/
#[Container(ContainerInterface::class)]
public \Kiri\Di\Container $container;
/**
* @var string
*/
@@ -141,7 +127,7 @@ abstract class BaseProcess implements OnProcessInterface
{
$this->stop = true;
$value = Context::get('waite:process:message');
$this->logger->alert('Process ' . $this->getName() . ' stop');
\Kiri::getLogger()->alert('Process ' . $this->getName() . ' stop');
if (!is_null($value) && Coroutine::exists((int)$value)) {
Coroutine::cancel((int)$value);
}