mirror of
https://gitee.com/hyperf/hyperf.git
synced 2024-11-29 10:17:39 +08:00
Fix typo (#3282)
* Optimized 改正变量单词拼写 * Update SignalManager.php * Update CHANGELOG-2.1.md Co-authored-by: 李铭昕 <715557344@qq.com>
This commit is contained in:
parent
d5382e7eb8
commit
9a9ee695d0
@ -62,7 +62,7 @@
|
||||
## Fixed
|
||||
|
||||
- [#2913](https://github.com/hyperf/hyperf/pull/2913) Fixed memory leak when using `with()` for ORM.
|
||||
- [#2915](https://github.com/hyperf/hyperf/pull/2915) Fixed bug that worker will be stoped when `onMessage` or `onClose` failed in websocket server.
|
||||
- [#2915](https://github.com/hyperf/hyperf/pull/2915) Fixed bug that worker will be stopped when `onMessage` or `onClose` failed in websocket server.
|
||||
- [#2927](https://github.com/hyperf/hyperf/pull/2927) Fixed validation rule `alpha_dash` does not support `int`.
|
||||
|
||||
## Changed
|
||||
|
@ -13,6 +13,7 @@
|
||||
## Changed
|
||||
|
||||
- [#3258](https://github.com/hyperf/hyperf/pull/3258) Set different client ids based on different kafka consumers.
|
||||
- [#3282](https://github.com/hyperf/hyperf/pull/3282) Renamed `stoped` to `stopped` for `hyperf/signal`.
|
||||
|
||||
# v2.1.6 - 2021-02-08
|
||||
|
||||
|
@ -134,7 +134,7 @@
|
||||
## Fixed
|
||||
|
||||
- [#2913](https://github.com/hyperf/hyperf/pull/2913) Fixed memory leak when using `with()` for ORM.
|
||||
- [#2915](https://github.com/hyperf/hyperf/pull/2915) Fixed bug that worker will be stoped when `onMessage` or `onClose` failed in websocket server.
|
||||
- [#2915](https://github.com/hyperf/hyperf/pull/2915) Fixed bug that worker will be stopped when `onMessage` or `onClose` failed in websocket server.
|
||||
- [#2927](https://github.com/hyperf/hyperf/pull/2927) Fixed validation rule `alpha_dash` does not support `int`.
|
||||
|
||||
## Changed
|
||||
|
@ -42,7 +42,7 @@ class LogAfterProcessStoppedListener implements ListenerInterface
|
||||
*/
|
||||
public function process(object $event)
|
||||
{
|
||||
$message = sprintf('Process[%s.%d] stoped.', $event->process->name, $event->index);
|
||||
$message = sprintf('Process[%s.%d] stopped.', $event->process->name, $event->index);
|
||||
if ($this->container->has(StdoutLoggerInterface::class)) {
|
||||
$logger = $this->container->get(StdoutLoggerInterface::class);
|
||||
$logger->info($message);
|
||||
|
@ -42,6 +42,6 @@ class SignalDeregisterListener implements ListenerInterface
|
||||
public function process(object $event)
|
||||
{
|
||||
$manager = $this->container->get(SignalManager::class);
|
||||
$manager->setStoped(true);
|
||||
$manager->setStopped(true);
|
||||
}
|
||||
}
|
||||
|
@ -40,7 +40,7 @@ class SignalManager
|
||||
/**
|
||||
* @var bool
|
||||
*/
|
||||
protected $stoped = false;
|
||||
protected $stopped = false;
|
||||
|
||||
public function __construct(ContainerInterface $container)
|
||||
{
|
||||
@ -84,7 +84,7 @@ class SignalManager
|
||||
}
|
||||
}
|
||||
|
||||
if ($this->isStoped()) {
|
||||
if ($this->isStopped()) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
@ -92,17 +92,33 @@ class SignalManager
|
||||
}
|
||||
}
|
||||
|
||||
public function isStoped(): bool
|
||||
public function isStopped(): bool
|
||||
{
|
||||
return $this->stoped;
|
||||
return $this->stopped;
|
||||
}
|
||||
|
||||
public function setStoped(bool $stoped): self
|
||||
/**
|
||||
* @deprecated v2.2
|
||||
*/
|
||||
public function isStoped(): bool
|
||||
{
|
||||
$this->stoped = $stoped;
|
||||
return $this->isStopped();
|
||||
}
|
||||
|
||||
public function setStopped(bool $stopped): self
|
||||
{
|
||||
$this->stopped = $stopped;
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated v2.2
|
||||
*/
|
||||
public function setStoped(bool $stopped): self
|
||||
{
|
||||
return $this->setStopped($stopped);
|
||||
}
|
||||
|
||||
protected function isInvalidProcess(?int $process): bool
|
||||
{
|
||||
return ! in_array($process, [
|
||||
|
Loading…
Reference in New Issue
Block a user