Skip to content

Commit

Permalink
修改一处参数错误
Browse files Browse the repository at this point in the history
  • Loading branch information
xutl committed Sep 1, 2018
1 parent 94f1849 commit 161256b
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion src/MNSFlushCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ public function handle()
if (!$queue) {
$queue = $config['queue'];
}
$client = new Client($config['endpoint'], $config['key'], $config['secret']);
$client = new Client($this->getEndpoint($config), $config['access_id'], $config['access_key'], $config['security_token']);
$queue = $client->getQueueRef($queue);
$hasMessage = true;
while ($hasMessage) {
Expand Down Expand Up @@ -88,6 +88,16 @@ protected function getArguments()
];
}

/**
* @param array $config
*
* @return mixed
*/
protected function getEndpoint(array $config)
{
return str_replace('(s)', 's', $config['endpoint']);
}

/**
* Get the console command arguments.
*
Expand Down

0 comments on commit 161256b

Please sign in to comment.