diff --git a/System/Abstracts/BaseApplication.php b/System/Abstracts/BaseApplication.php index 9ec48090..c8f9ff97 100644 --- a/System/Abstracts/BaseApplication.php +++ b/System/Abstracts/BaseApplication.php @@ -116,16 +116,18 @@ abstract class BaseApplication extends Service $this->taskNumber = 0; $this->state = 'SWOOLE_WORKER_IDLE'; } - return $this->print_task_is_idle(); + return $this->print_task_is_idle(__METHOD__); } /** + * @param $method + * @return BaseApplication * @throws ComponentException */ - private function print_task_is_idle(): static + private function print_task_is_idle($method): static { - $this->warning(sprintf('%s:%d state %s has number %d', Snowflake::getEnvironmental(), env('worker'), $this->state, $this->taskNumber)); + $this->warning(sprintf('%s %s:%d state %s has number %d', $method, Snowflake::getEnvironmental(), env('worker'), $this->state, $this->taskNumber)); return $this; } @@ -143,7 +145,7 @@ abstract class BaseApplication extends Service } else { $this->state = 'SWOOLE_WORKER_BUSY'; } - return $this->print_task_is_idle(); + return $this->print_task_is_idle(__METHOD__); }