This commit is contained in:
2021-03-23 17:00:17 +08:00
parent c506bbcb8b
commit 64e179fb25
2 changed files with 7 additions and 1 deletions
+6
View File
@@ -5,6 +5,7 @@ namespace Annotation\Rpc;
use Annotation\Attribute;
use Exception;
use ReflectionException;
use Rpc\IProducer;
use Snowflake\Exception\ComponentException;
@@ -48,11 +49,16 @@ use Snowflake\Snowflake;
* @throws ReflectionException
* @throws ComponentException
* @throws NotFindClassException
* @throws Exception
*/
public function execute(array $handler): mixed
{
$rpc = Snowflake::app()->getRpc();
$rpc->addProducer($this->cmd, $handler, $this->config);
$attributes = Snowflake::app()->getAttributes();
$attributes->injectProperty($handler[0]);
return parent::execute($handler);
}