Commit 071b4a89 by xmy

连接池

parent 62ea5c90
...@@ -20,8 +20,14 @@ use Swoft\Pool\PoolProperties; ...@@ -20,8 +20,14 @@ use Swoft\Pool\PoolProperties;
*/ */
class GoodsPoolConfig extends PoolProperties class GoodsPoolConfig extends PoolProperties
{ {
public function __construct()
{
// 区别本地和线上的RPC服务地址
$this->uri = explode(',', env('RPC_GOODS_URI', '172.21.0.47:8099,172.16.255.235:8099'));
}
protected $name = 'seller';
protected $name = 'seller';
/** /**
* Minimum active number of connections * Minimum active number of connections
......
...@@ -21,6 +21,12 @@ use Swoft\Pool\PoolProperties; ...@@ -21,6 +21,12 @@ use Swoft\Pool\PoolProperties;
class SellerDistributionPoolConfig extends PoolProperties class SellerDistributionPoolConfig extends PoolProperties
{ {
public function __construct()
{
// 区别本地和线上的RPC服务地址
$this->uri = explode(',', env('RPC_SELLER_DISTRIBUTION_URI', '172.21.0.17:8099,172.16.255.34:8099'));
}
protected $name = 'sellerDistribution'; protected $name = 'sellerDistribution';
/** /**
......
...@@ -21,6 +21,12 @@ use Swoft\Pool\PoolProperties; ...@@ -21,6 +21,12 @@ use Swoft\Pool\PoolProperties;
class SellerPoolConfig extends PoolProperties class SellerPoolConfig extends PoolProperties
{ {
public function __construct()
{
// 区别本地和线上的RPC服务地址
$this->uri = explode(',', env('RPC_SELLER_URI', '172.21.0.10:8099,172.16.255.196:8099'));
}
protected $name = 'seller'; protected $name = 'seller';
/** /**
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment