改名
This commit is contained in:
@@ -49,14 +49,8 @@ use Snowflake\Snowflake;
|
|||||||
*/
|
*/
|
||||||
public function execute(array $handler): mixed
|
public function execute(array $handler): mixed
|
||||||
{
|
{
|
||||||
// TODO: Change the autogenerated stub
|
|
||||||
if ($handler[0] instanceof IProducer) {
|
|
||||||
$handler[0]->initClient();
|
|
||||||
}
|
|
||||||
|
|
||||||
$rpc = Snowflake::app()->getRpc();
|
$rpc = Snowflake::app()->getRpc();
|
||||||
$rpc->addProducer($this->cmd, $handler, $this->config);
|
$rpc->addProducer($this->cmd, $handler, $this->config);
|
||||||
|
|
||||||
return parent::execute($handler);
|
return parent::execute($handler);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -42,6 +42,10 @@ class Producer extends Component
|
|||||||
$this->consumers[$name] = $handler[0];
|
$this->consumers[$name] = $handler[0];
|
||||||
|
|
||||||
$this->producers[$name] = $node;
|
$this->producers[$name] = $node;
|
||||||
|
|
||||||
|
if ($handler[0] instanceof IProducer) {
|
||||||
|
$handler[0]->initClient();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user