| Conditions | 3 |
| Paths | 10 |
| Total Lines | 16 |
| Code Lines | 12 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 41 | public function handle() |
||
| 42 | { |
||
| 43 | $queue = $this->argument('queue'); |
||
| 44 | $connection = $this->option('connection'); |
||
| 45 | $config = config("queue.connections.{$connection}"); |
||
| 46 | if (!$queue) { |
||
| 47 | $queue = $this->ask('请输入队列名称'); |
||
| 48 | } |
||
| 49 | |||
| 50 | try { |
||
| 51 | $client = new Client($config['endpoint'], $config['key'], $config['secret']); |
||
| 52 | $client->deleteQueue($queue); |
||
| 53 | $this->info('队列删除成功'); |
||
| 54 | $this->alert($queue); |
||
| 55 | } catch (MnsException $e) { |
||
| 56 | $this->error('队列删除失败:' . $e); |
||
| 57 | } |
||
| 60 |