Phobetor / rabbitmq-supervisor-bundle

Symfony bundle to automatically create and update supervisor configurations for RabbitMQ consumer daemons
MIT License
104 stars 42 forks source link

Command "rabbitmq-supervisor" is not defined #51

Open iamserjo opened 6 years ago

iamserjo commented 6 years ago

I use symphony 4 Flex. According to the manual I install bundle composer require phobetor/rabbitmq-supervisor-bundle Then create file structure

tree var/supervisor/
| |____
| |____dev
| | |____worker
| | |____logs

But when I try to run command bin/console rabbitmq-supervisor

i got error Command "rabbitmq-supervisor" is not defined.

bin/console shows me all the commands but there is no group rabbitmq-supervisor

What am I doing wrong?

Phobetor commented 6 years ago

Hello @iamserjo

If you want to create all the configuration you need to use the command rabbitmq-supervisor:rebuild. Calling it would be something like

bin/console rabbitmq-supervisor:rebuild

rabbitmq-supervisor is the command group. You cannot call it directly. Just the commands inside it.

Best regards Andy

iamserjo commented 6 years ago

Hi @Phobetor. I am saying that rabbitmq-supervisor:rebuild not found in my command list. It even says that group named rabbitmq-supervisor doesn't exist.

Test case for my issue:

creating a demo app composer create-project symfony/symfony-demo cd symfony-demo/ installing rabbitmq-supervisor-bundle composer require phobetor/rabbitmq-supervisor-bundle trying to run command bin/console rabbitmq-supervisor:rebuild

Getting error: There are no commands defined in the "rabbitmq-supervisor" namespace.

sedatsevgili commented 5 years ago

Hi @iamserjo

You should add

\Phobetor\RabbitMqSupervisorBundle\RabbitMqSupervisorBundle::class => ['all' => true]

to your bundles.php. After that, you will be able to run the command. I don't know why this bundle does not register itself automatically after installing via composer.