PHP code example of eubourne / laravel-queue-throttle

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

    

eubourne / laravel-queue-throttle example snippets


/*
|--------------------------------------------------------------------------
| Rate Limits
|--------------------------------------------------------------------------
|
| Here you can set rate limits for specific queues to control the processing rate.
|
*/

'throttle' => [
    'mail' => [
        'allows' => 10,
        'every' => 60,
    ]
],

'throttle' => [
    'mail:notifications' => [
        'allows' => 10,
        'every' => 60,
    ]
],

/*
|--------------------------------------------------------------------------
| Rate Limits Logger
|--------------------------------------------------------------------------
|
| Configure logging channel for the queue throttler. If not set then logging
| will be disabled.
|
*/

'throttle_logger' => env('QUEUE_THROTTLE_LOGGER', null),
bash
php artisan queue:cache
bash 
php artisan queue:clear-cache
bash
php artisan optimize
php artisan optimize:clear
bash
php artisan queue:throttle
bash
php artisan queue:test {queue}
bash
php artisan queue:fill {count} {--queue=} 
bash
php artisan queue:fill 20 --queue=mail
php artisan queue:fill 20 --queue=notifications
bash
php artisan queue:monitor --queue=mail,notifications