This commit is contained in:
2023-04-03 11:08:10 +08:00
parent 22f1dec147
commit 0f870e4268
2 changed files with 3 additions and 3 deletions
+1 -1
View File
@@ -94,7 +94,7 @@ abstract class BaseProcess implements OnProcessInterface
protected function onShutdown($data): void protected function onShutdown($data): void
{ {
$this->isStop = true; $this->isStop = true;
$value = Context::getContext('waite:process:message'); $value = Context::get('waite:process:message');
\Kiri::getLogger()->alert('Process ' . $this->getName() . ' stop'); \Kiri::getLogger()->alert('Process ' . $this->getName() . ' stop');
+2 -2
View File
@@ -16,7 +16,7 @@ class DoWhile
*/ */
public static function waite(array|\Closure $handler): void public static function waite(array|\Closure $handler): void
{ {
if (Context::hasContext('stop')) { if (Context::exists('stop')) {
return; return;
} }
$handler(); $handler();
@@ -29,7 +29,7 @@ class DoWhile
*/ */
public static function stop(): void public static function stop(): void
{ {
Context::setContext('stop', 1); Context::set('stop', 1);
} }