aboutcoders / process-control-bundle
A symfony bundle that provides process control
Installs: 3 514
Dependents: 2
Suggesters: 2
Security: 0
Stars: 4
Watchers: 2
Forks: 0
Open Issues: 0
Type:symfony-bundle
Requires
- php: >=5.4.0
- aboutcoders/process-control: ~1.3
- symfony/symfony: ~2.6|~3.0
Requires (Dev)
This package is not auto-updated.
Last update: 2024-11-23 19:59:01 UTC
README
A symfony bundle that provides process control.
Installation
Add the AbcProcessControlBundle to your composer.json
file
{ "require": { "aboutcoders/process-control-bundle": "~1.0" } }
Then include the bundle in the AppKernel.php class
public function registerBundles() { $bundles = array( // ... new Abc\Bundle\ProcessControlBundle\AbcProcessControlBundle(), // ... ); }
Usage
The AbcProcessControlBundle registers a service with the name abc.process_control.controller
in the service container. This service is by default initialized with a PCNTL implementation, that listents to the SIGTERM
event and thus indicates to exist, when this signal was sent.
$controller = $container->get('abc.process_control.controller'); if($controller->doExit()){ // true if SIGTERM was sent }
Configuration
Registration of the service abc.process_control.controller
is enabled by default. You can disable that with the following configuration:
abc_process_control: register_controller: false
Note: When registration is disabled the service abc.process_control.controller
does not exist within the service container.