PHP code example of understeam / yii2-supervisor

1. Go to this page and download the library: Download understeam/yii2-supervisor library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

understeam / yii2-supervisor example snippets


...
'controllerMap' => [
    'class' => 'understeam\supervisor\SupervisorController',
    'phpBinary' => '/usr/bin/php',  // (optional) Path to php binary
    'yiiFile' => '@app/yii',        // (optional) Path to yii script file
    'commands' => [
        'my-process' => [       // Process group name 
            'command' => [
                'queue/listen', // Yii console action
                'default',      // Arguments
            ],
            'count' => 4,       // Process count
        ],
    ],
],
...