2017 © Pedro Peláez
 

symfony-bundle supervisor

Control Supervisord

image

ivan1986/supervisor

Control Supervisord

  • Wednesday, September 7, 2016
  • by ivan1986
  • Repository
  • 1 Watchers
  • 8 Stars
  • 7,484 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 2 Forks
  • 0 Open issues
  • 3 Versions
  • 1 % Grown

The README.md

Supervisor Control Bundle

SensioLabsInsight Scrutinizer Quality Score, (*1)

knpbundles.com, (*2)

This bundle for quick configure and usage separate instance of supervisord., (*3)

All Symfony2 commands run supervisor from kernel.root dir path. If use config created by supervisor:init use local configure file., (*4)

install default by composer:, (*5)

"ivan1986/supervisor": "*",

Initialize the bundle:, (*6)

new Ivan1986\SupervisorBundle\SupervisorBundle(),

Bundle has commands:, (*7)

  • 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., (*8)

$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., (*9)

Also supervisord run with -i, configured by parameter. Without this list of /usr/bin/python /usr/bin/supervisord in process list - great looking :), (*10)

The Versions