File tree Expand file tree Collapse file tree 4 files changed +19
-14
lines changed
Expand file tree Collapse file tree 4 files changed +19
-14
lines changed Original file line number Diff line number Diff line change 3939 "php" : " ^8.1" ,
4040 "psr/container" : " ^1.0|^2.0" ,
4141 "psr/log" : " ^2.0|^3.0" ,
42- "symfony/console" : " ^5.4|^6.0" ,
42+ "symfony/console" : " ^5.4|^6.0|^7.0 " ,
4343 "yiisoft/definitions" : " ^3.3.1" ,
4444 "yiisoft/factory" : " ^1.3" ,
4545 "yiisoft/friendly-exception" : " ^1.0" ,
Original file line number Diff line number Diff line change 44
55namespace Yiisoft \Queue \Command ;
66
7+ use Symfony \Component \Console \Attribute \AsCommand ;
78use Symfony \Component \Console \Command \Command ;
89use Symfony \Component \Console \Input \InputArgument ;
910use Symfony \Component \Console \Input \InputInterface ;
1213use Yiisoft \Queue \Cli \LoopInterface ;
1314use Yiisoft \Queue \Provider \QueueProviderInterface ;
1415
16+ #[AsCommand(
17+ 'queue:listen-all ' ,
18+ 'Listens the all the given queues and executes messages as they come. '
19+ . 'Meant to be used in development environment only. '
20+ . 'Listens all configured queues by default in case you \'re using yiisoft/config. '
21+ . 'Needs to be stopped manually. '
22+ )]
1523final class ListenAllCommand extends Command
1624{
17- protected static $ defaultName = 'queue:listen-all ' ;
18- protected static $ defaultDescription = 'Listens the all the given queues and executes messages as they come. ' .
19- 'Meant to be used in development environment only. ' .
20- 'Listens all configured queues by default in case you \'re using yiisoft/config. ' .
21- 'Needs to be stopped manually. ' ;
22-
2325 public function __construct (
2426 private readonly QueueProviderInterface $ queueProvider ,
2527 private readonly LoopInterface $ loop ,
Original file line number Diff line number Diff line change 44
55namespace Yiisoft \Queue \Command ;
66
7+ use Symfony \Component \Console \Attribute \AsCommand ;
78use Symfony \Component \Console \Command \Command ;
89use Symfony \Component \Console \Input \InputArgument ;
910use Symfony \Component \Console \Input \InputInterface ;
1011use Symfony \Component \Console \Output \OutputInterface ;
1112use Yiisoft \Queue \Provider \QueueProviderInterface ;
1213use Yiisoft \Queue \QueueInterface ;
1314
15+ #[AsCommand(
16+ 'queue:listen ' ,
17+ 'Listens the queue and executes messages as they come. Needs to be stopped manually. '
18+ )]
1419final class ListenCommand extends Command
1520{
16- protected static $ defaultName = 'queue:listen ' ;
17- protected static $ defaultDescription = 'Listens the queue and executes messages as they come. Needs to be stopped manually. ' ;
18-
1921 public function __construct (
2022 private readonly QueueProviderInterface $ queueProvider
2123 ) {
Original file line number Diff line number Diff line change 44
55namespace Yiisoft \Queue \Command ;
66
7+ use Symfony \Component \Console \Attribute \AsCommand ;
78use Symfony \Component \Console \Command \Command ;
89use Symfony \Component \Console \Input \InputArgument ;
910use Symfony \Component \Console \Input \InputInterface ;
1011use Symfony \Component \Console \Input \InputOption ;
1112use Symfony \Component \Console \Output \OutputInterface ;
1213use Yiisoft \Queue \Provider \QueueProviderInterface ;
1314
15+ #[AsCommand(
16+ 'queue:run ' ,
17+ 'Runs all the existing messages in the given queues. Exits once messages are over. '
18+ )]
1419final class RunCommand extends Command
1520{
16- protected static $ defaultName = 'queue:run ' ;
17- protected static $ defaultDescription = 'Runs all the existing messages in the given queues. ' .
18- 'Exits once messages are over. ' ;
19-
2021 public function __construct (
2122 private readonly QueueProviderInterface $ queueProvider ,
2223 private readonly array $ channels ,
You can’t perform that action at this time.
0 commit comments