Skip to content

Commit

Permalink
Merge pull request #3 from alchemy-fr/feature/better-output
Browse files Browse the repository at this point in the history
Improve show configuration command output
  • Loading branch information
aztech-dev authored Oct 6, 2016
2 parents 92f3adb + 6efa616 commit 9796201
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions src/WorkerBundle/Commands/ShowQueueConfigurationCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
use Symfony\Component\Console\Command\Command;
use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Console\Output\OutputInterface;
use Symfony\Component\Yaml\Yaml;

class ShowQueueConfigurationCommand extends Command
{
Expand All @@ -31,10 +32,10 @@ protected function configure()

public function execute(InputInterface $input, OutputInterface $output)
{
foreach ($this->queueRegistry->getConfigurations() as $configuration) {
var_dump($configuration);
}
$output->writeln([ '', 'Configured queues: ' ]);

var_dump($this->queueRegistry->getQueue('worker-queue'));
foreach ($this->queueRegistry->getConfigurations() as $name => $configuration) {
$output->writeln([ ' ' . $name . ': ' . Yaml::dump($configuration, 0), '' ]);
}
}
}

0 comments on commit 9796201

Please sign in to comment.