Download the PHP package pmiroslawski/supervisor-controller-bundle without Composer
On this page you can find all versions of the php package pmiroslawski/supervisor-controller-bundle. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download pmiroslawski/supervisor-controller-bundle
More information about pmiroslawski/supervisor-controller-bundle
Files in pmiroslawski/supervisor-controller-bundle
Package supervisor-controller-bundle
Short Description PHP Symfony Bundle which manage of supervisor processes
License MIT
Homepage https://github.com/pmiroslawski/supervisor-controller-bundle
Informations about the package supervisor-controller-bundle
PHP Supervisor Controller Bundle
Symfony bundle which manages supervisor processes automatically based on given thresholds configuration. Bundle is implemented using the helppc/supervisor-bundle library.
Example of use
Check this: pmiroslawski/supervisor-controller-demo to see the bundle in action.
Requirements
- PHP 7.4 or greater
- Symfony 5.x
Installation
-
Require the bundle and a PSR 7/17 implementation with Composer:
-
Create the bundle configuration file under
config/packages/bit9_supervisor_controller.yaml
. Here is a reference configuration file: - Enable the bundle in
config/bundles.php
by adding it to the array:
Usage
The bundle provides an extra public service which can number of processes for spcified queue
That service has only one method execute
which get as arguments name of the queue and current number of messages in given queue. Base on thresholds defined in configuration for specified queue service starting extra processes or stoping already running one which consume a given queue.
Above service has been implemented in supervisor:queue:monitor
command also delivered in this bundle.
Additionally, bundle provides bunch of extra commands in supervisor namespace which can help to manage configuration and let you easy execute basic commands:
Events
The bundle provides events and dispatches them in some specified situations. There are two groups of events
When bundle does start/stop processes, one of the below events is dispatching:
Both of them contain:
- consumer name (the group name)
- number of started/stopped processes
- total number of running processes (after operation)
When bundle does start/stop a specified single process, one of the below events is dispatching:
Both of them contain:
- exact process name (the same as in supervisor)
- timestamp of started/stopped given process
License
The MIT License (MIT). Please see License File for more information.
All versions of supervisor-controller-bundle with dependencies
helppc/supervisor-bundle Version ^1
symfony/framework-bundle Version ^5
symfony/yaml Version ^5
symfony/config Version ^5
symfony/console Version ^5
symfony/event-dispatcher Version ^5.3