PHP code example of timmylindh / laravel-beanstalk-worker

1. Go to this page and download the library: Download timmylindh/laravel-beanstalk-worker 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/ */

    

timmylindh / laravel-beanstalk-worker example snippets


return [
    /*
     * Whether the application is a worker or not.
     * This will determine whether to register the worker routes or not.
     */
    "is_worker" => env("IS_WORKER", false),

    // The number of seconds to wait before retrying a job that encountered an uncaught exception.
    "backoff" => env("WORKER_BACKOFF", 0),

    // The number of seconds a job may run before timing out.
    'timeout' => env('WORKER_TIMEOUT', 60),

    // The maximum number of times a job may be attempted.
    "max_tries" => env("WORKER_MAX_TRIES", 1),
];
bash
php artisan vendor:publish --tag="laravel-beanstalk-worker-config"
bash
php artisan vendor:publish --tag="laravel-beanstalk-worker-config"