PHP code example of descom / laravel-supervisor-queue

1. Go to this page and download the library: Download descom/laravel-supervisor-queue 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/ */

    

descom / laravel-supervisor-queue example snippets




return [
    'workers' => [
        'default' => [
            'options' => [
                // 'sleep' => 3,
                // 'tries' => 3,
                // 'max-time' => 3600,
            ],

            // 'connection' => 'database',

            // 'enabled' => false,
        ],

        // 'other_worker' => [
        //     'options' => [max-time' => 3600],
        //     'connection' => 'sqs',
        // ],
    ],

    'schedule' => [

        'start' => [
            'enabled' => true,

            // 'cron' => '* * * * *',
        ],

    ],
];


use Descom\Supervisor\Service;

Service::status();
Service::start();
Service::stop();
Service::restart();
sh
php artisan vendor:publish --provider="Descom\Supervisor\SupervisorServiceProvider" --tag="config"
sh
php artisan supervisor:status
php artisan supervisor:start
php artisan supervisor:stop
php artisan supervisor:restart