Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
"php": "^8.1",
"psr/container": "^1.0|^2.0",
"psr/log": "^2.0|^3.0",
"symfony/console": "^5.4|^6.0",
"symfony/console": "^5.4|^6.0|^7.0",
"yiisoft/definitions": "^3.3.1",
"yiisoft/factory": "^1.3",
"yiisoft/friendly-exception": "^1.0",
Expand Down
14 changes: 8 additions & 6 deletions src/Command/ListenAllCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

namespace Yiisoft\Queue\Command;

use Symfony\Component\Console\Attribute\AsCommand;
use Symfony\Component\Console\Command\Command;
use Symfony\Component\Console\Input\InputArgument;
use Symfony\Component\Console\Input\InputInterface;
Expand All @@ -12,14 +13,15 @@
use Yiisoft\Queue\Cli\LoopInterface;
use Yiisoft\Queue\Provider\QueueProviderInterface;

#[AsCommand(
'queue:listen-all',
'Listens the all the given queues and executes messages as they come. '
. 'Meant to be used in development environment only. '
. 'Listens all configured queues by default in case you\'re using yiisoft/config. '
. 'Needs to be stopped manually.'
)]
final class ListenAllCommand extends Command
{
protected static $defaultName = 'queue:listen-all';
protected static $defaultDescription = 'Listens the all the given queues and executes messages as they come. ' .
'Meant to be used in development environment only. ' .
'Listens all configured queues by default in case you\'re using yiisoft/config. ' .
'Needs to be stopped manually.';

public function __construct(
private readonly QueueProviderInterface $queueProvider,
private readonly LoopInterface $loop,
Expand Down
8 changes: 5 additions & 3 deletions src/Command/ListenCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,18 +4,20 @@

namespace Yiisoft\Queue\Command;

use Symfony\Component\Console\Attribute\AsCommand;
use Symfony\Component\Console\Command\Command;
use Symfony\Component\Console\Input\InputArgument;
use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Console\Output\OutputInterface;
use Yiisoft\Queue\Provider\QueueProviderInterface;
use Yiisoft\Queue\QueueInterface;

#[AsCommand(
'queue:listen',
'Listens the queue and executes messages as they come. Needs to be stopped manually.'
)]
final class ListenCommand extends Command
{
protected static $defaultName = 'queue:listen';
protected static $defaultDescription = 'Listens the queue and executes messages as they come. Needs to be stopped manually.';

public function __construct(
private readonly QueueProviderInterface $queueProvider
) {
Expand Down
9 changes: 5 additions & 4 deletions src/Command/RunCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,19 +4,20 @@

namespace Yiisoft\Queue\Command;

use Symfony\Component\Console\Attribute\AsCommand;
use Symfony\Component\Console\Command\Command;
use Symfony\Component\Console\Input\InputArgument;
use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Console\Input\InputOption;
use Symfony\Component\Console\Output\OutputInterface;
use Yiisoft\Queue\Provider\QueueProviderInterface;

#[AsCommand(
'queue:run',
'Runs all the existing messages in the given queues. Exits once messages are over.'
)]
final class RunCommand extends Command
{
protected static $defaultName = 'queue:run';
protected static $defaultDescription = 'Runs all the existing messages in the given queues. ' .
'Exits once messages are over.';

public function __construct(
private readonly QueueProviderInterface $queueProvider,
private readonly array $channels,
Expand Down
Loading