|
@@ -47,10 +47,11 @@ class VirusAdd extends Command
|
|
|
$this->channel = $this->connection->channel();
|
|
|
$this->channel->exchange_declare($this->queue, 'fanout', false, true, false);
|
|
|
// 初始化virus域名
|
|
|
- $this->client = new Client([
|
|
|
+ $this->virusClient = new Client([
|
|
|
'base_uri' => config('customer.VIRUS_URL'),
|
|
|
'timeout' => 3
|
|
|
]);
|
|
|
+ Log::debug('virusClient:'.json_encode($this->virusClient));
|
|
|
}
|
|
|
|
|
|
public function getConnection()
|
|
@@ -114,7 +115,7 @@ class VirusAdd extends Command
|
|
|
|
|
|
private function send($data)
|
|
|
{
|
|
|
- Log::debug('client:'.json_encode($this->client));
|
|
|
+ Log::debug('client:'.json_encode($this->virusClient));
|
|
|
try {
|
|
|
// 签名设置
|
|
|
$signKey = [
|
|
@@ -184,7 +185,7 @@ class VirusAdd extends Command
|
|
|
return false;
|
|
|
}
|
|
|
|
|
|
- $response = $this->client->request('POST', '/v2/record/add', [
|
|
|
+ $response = $this->virusClient->request('POST', '/v2/record/add', [
|
|
|
'headers' => [
|
|
|
'Content-Type' => 'application/json'
|
|
|
],
|