ivan1986 / supervisor
Control Supervisord
Installs: 8 144
Dependents: 0
Suggesters: 0
Security: 0
Stars: 8
Watchers: 1
Forks: 2
Open Issues: 0
Type:symfony-bundle
pkg:composer/ivan1986/supervisor
Requires
- symfony/dependency-injection: ~2.1|~3.0
 - symfony/framework-bundle: ~2.1|~3.0
 - symfony/process: ~2.1|~3.0
 - symfony/twig-bundle: ~2.1|~3.0
 
This package is not auto-updated.
Last update: 2025-10-25 20:47:07 UTC
README
This bundle for quick configure and usage separate instance of supervisord.
All Symfony2 commands run supervisor from kernel.root dir path. If use config created by supervisor:init use local configure file.
install default by composer:
"ivan1986/supervisor": "*",
Initialize the bundle:
new Ivan1986\SupervisorBundle\SupervisorBundle(),
Bundle has commands:
- supervisor:init
- create supervisord.conf file and supervisor folder in app folder
 
 - supervisor:run
- check instance of supervisord and run it if need
 - add this command to cron - simple quick watchdog for supervisord
 
 - supervisor:control
- run any supervisorCtl command
 
 - supervisor:gen
- generate simple programm section for symfony2 console command
 
 
Example code for rabbitmq scale workers.
$this->get('supervisor')->genProgrammConf('worker', array(
    'name' => 'worker',
    'command' => 'rabbitmq:consumer sender',
    'numprocs' => $this->getNeedWorkersCount(),
));
$this->get('supervisor')->run();
$this->get('supervisor')->reloadAndUpdate();
Service supervisor may run daemon, execute any command, and generate files for supervisord.
Also supervisord run with -i, configured by parameter. Without this list of
/usr/bin/python /usr/bin/supervisord in process list - great looking :)