Skip to content

Commit

Permalink
Add queues command
Browse files Browse the repository at this point in the history
  • Loading branch information
apfelbox committed Jun 19, 2024
1 parent 19e3bc9 commit 5fbb3c6
Showing 1 changed file with 37 additions and 0 deletions.
37 changes: 37 additions & 0 deletions src/Command/QueuesCommand.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
<?php declare(strict_types=1);

namespace Torr\TaskManager\Command;

use Symfony\Component\Console\Attribute\AsCommand;
use Symfony\Component\Console\Command\Command;
use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Console\Output\OutputInterface;
use Torr\TaskManager\Transport\TransportsHelper;

#[AsCommand("task-manager:queues")]
final class QueuesCommand extends Command
{
/**
*/
public function __construct (
private readonly TransportsHelper $transportsHelper,
)
{
parent::__construct();
}


/**
*
*/
#[\Override]
protected function execute (InputInterface $input, OutputInterface $output) : int
{
$output->writeln(\implode(
" ",
$this->transportsHelper->getOrderedQueueNames(),
));
return self::SUCCESS;
}

}

0 comments on commit 5fbb3c6

Please sign in to comment.