Commit bf3983a5 by xmy

关闭订单队列

parent aa2d11b9
...@@ -24,14 +24,15 @@ class Account ...@@ -24,14 +24,15 @@ class Account
:: CMQClientParameterException host格式错误 :: CMQClientParameterException host格式错误
*/ */
public function __construct($host = '', $secretId = '', $secretKey = '') public function __construct($host = '', $secretId = '', $secretKey = '')
{ {
$config = include alias('@vendor/hdll/services/src/Common/Config') . '/config.php'; $config = include alias('@vendor/hdll/services/src/Common/Config') . '/config.php';
$config = $config['cmq']; $config = $config['cmq'];
$this->host = $host ?? $config['host']; $this->host = empty($host) ? $config['host'] : $host;
$this->secretId = $secretId ?? $config['secretId']; $this->secretId = empty($secretId) ? $config['secretId'] : $secretId;
$this->secretKey = $secretKey ?? $config['secretKey']; $this->secretKey = empty($secretKey) ? $config['secretKey'] : $secretKey;
$this->cmq_client = new CMQClient($host, $secretId, $secretKey); $this->cmq_client = new CMQClient($this->host, $this->secretId, $this->secretKey);
} }
/* /*
......
...@@ -19,7 +19,7 @@ return [ ...@@ -19,7 +19,7 @@ return [
], ],
'cmq' => [ 'cmq' => [
// 'host' => 'http: //cmq-queue-bj.api.tencentyun.com',//内网 // 'host' => 'http: //cmq-queue-bj.api.tencentyun.com',//内网
'host' => 'https://cmq-queue-bj.api.qcloud.com',//外网 'host' => 'https://cmq-topic-bj.api.qcloud.com',//外网
'secretId' => 'AKIDYRW1cG2iVIg8dAoCe86vhNuA7A5oNknk', 'secretId' => 'AKIDYRW1cG2iVIg8dAoCe86vhNuA7A5oNknk',
'secretKey' => 'z0ymS7xfLrP6Sk2EKHWaXN6d0EIxX0IQ', 'secretKey' => 'z0ymS7xfLrP6Sk2EKHWaXN6d0EIxX0IQ',
], ],
......
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