Download the PHP package bluepsyduck/symfony-process-manager without Composer
On this page you can find all versions of the php package bluepsyduck/symfony-process-manager. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download bluepsyduck/symfony-process-manager
More information about bluepsyduck/symfony-process-manager
Files in bluepsyduck/symfony-process-manager
Package symfony-process-manager
Short Description A process manager for Symfony processes, able to run them in parallel.
License GPL-3.0-or-later
Homepage https://github.com/BluePsyduck/symfony-process-manager
Informations about the package symfony-process-manager
Symfony Process Manager
This package provides a simple process manager class to be able to execute multiple processes with a specified limit of parallel processes. The class expects the processes to use the Symfony Process component.
Usage
The usage of the process manager is straight forward and best explained with an example.
Callbacks
The process manager allows for some callbacks to be specified, which get called depending on the state of a process.
- processStartCallback: Triggered before a process is started.
- processFinishCallback: Triggered when a process has finished.
- processTimeoutCallback: Triggered when a process timed out. Note that the processFinishCallback will be triggered afterwards as well.
- processCheckCallback: Triggered whenever a process is checked for completion. Note that this callback is called
periodically, but at least once, between the
processStartCallback
and theprocessFinishCallback
orprocessTimeoutCallback
respectively.
Each callback gets the process instance which triggered the event passed as only parameter. Here is an example of
setting a processStartCallback
: