Skip to content

Commit 161256b

Browse files
committed
修改一处参数错误
1 parent 94f1849 commit 161256b

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

src/MNSFlushCommand.php

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ public function handle()
4343
if (!$queue) {
4444
$queue = $config['queue'];
4545
}
46-
$client = new Client($config['endpoint'], $config['key'], $config['secret']);
46+
$client = new Client($this->getEndpoint($config), $config['access_id'], $config['access_key'], $config['security_token']);
4747
$queue = $client->getQueueRef($queue);
4848
$hasMessage = true;
4949
while ($hasMessage) {
@@ -88,6 +88,16 @@ protected function getArguments()
8888
];
8989
}
9090

91+
/**
92+
* @param array $config
93+
*
94+
* @return mixed
95+
*/
96+
protected function getEndpoint(array $config)
97+
{
98+
return str_replace('(s)', 's', $config['endpoint']);
99+
}
100+
91101
/**
92102
* Get the console command arguments.
93103
*

0 commit comments

Comments
 (0)