From 0f870e426891144c0d93576b0b63f8b96a037f5d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=90=91=E6=9E=97?= Date: Mon, 3 Apr 2023 11:08:10 +0800 Subject: [PATCH] =?UTF-8?q?=E5=8F=98=E6=9B=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Abstracts/BaseProcess.php | 2 +- Abstracts/DoWhile.php | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Abstracts/BaseProcess.php b/Abstracts/BaseProcess.php index 06326e6..88a787b 100644 --- a/Abstracts/BaseProcess.php +++ b/Abstracts/BaseProcess.php @@ -94,7 +94,7 @@ abstract class BaseProcess implements OnProcessInterface protected function onShutdown($data): void { $this->isStop = true; - $value = Context::getContext('waite:process:message'); + $value = Context::get('waite:process:message'); \Kiri::getLogger()->alert('Process ' . $this->getName() . ' stop'); diff --git a/Abstracts/DoWhile.php b/Abstracts/DoWhile.php index 243fc44..f252063 100644 --- a/Abstracts/DoWhile.php +++ b/Abstracts/DoWhile.php @@ -16,7 +16,7 @@ class DoWhile */ public static function waite(array|\Closure $handler): void { - if (Context::hasContext('stop')) { + if (Context::exists('stop')) { return; } $handler(); @@ -29,7 +29,7 @@ class DoWhile */ public static function stop(): void { - Context::setContext('stop', 1); + Context::set('stop', 1); }