Skip to content

Commit

Permalink
Merge pull request #21 from kylin987/main
Browse files Browse the repository at this point in the history
注册服务时enabled的值转字符串
  • Loading branch information
chaz6chez authored Dec 15, 2023
2 parents 77b79a5 + a7f824b commit 7f7357d
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/Process/InstanceRegistrarProcess.php
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,7 @@ public function onWorkerStart(Worker $worker)
foreach ($instanceRegistrars as $name => $instanceRegistrar){
// 拆解配置
list($serviceName, $ip, $port, $option) = $instanceRegistrar;
$option['enabled'] = is_bool($option['enabled']) ? ($option['enabled'] ? 'true' : 'false') : $option['enabled'];
// 注册
$promises[] = $this->client->instance->registerAsync($ip, $port, $serviceName, $option)
->then(function (ResponseInterface $response) use ($instanceRegistrar, $name) {
Expand Down

0 comments on commit 7f7357d

Please sign in to comment.