改名
This commit is contained in:
@@ -116,16 +116,18 @@ abstract class BaseApplication extends Service
|
|||||||
$this->taskNumber = 0;
|
$this->taskNumber = 0;
|
||||||
$this->state = 'SWOOLE_WORKER_IDLE';
|
$this->state = 'SWOOLE_WORKER_IDLE';
|
||||||
}
|
}
|
||||||
return $this->print_task_is_idle();
|
return $this->print_task_is_idle(__METHOD__);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
* @param $method
|
||||||
|
* @return BaseApplication
|
||||||
* @throws ComponentException
|
* @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;
|
return $this;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -143,7 +145,7 @@ abstract class BaseApplication extends Service
|
|||||||
} else {
|
} else {
|
||||||
$this->state = 'SWOOLE_WORKER_BUSY';
|
$this->state = 'SWOOLE_WORKER_BUSY';
|
||||||
}
|
}
|
||||||
return $this->print_task_is_idle();
|
return $this->print_task_is_idle(__METHOD__);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user