PHP code example of dusterio / laravel-aws-worker

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

    

dusterio / laravel-aws-worker example snippets

 artisan schedule:run

protected function schedule(Schedule $schedule)
{
    $schedule->command('inspire')
              ->everyMinute();
}

        ...
        'sqs' => [
            'driver' => 'sqs',
            'key' => 'your-public-key',
            'secret' => 'your-secret-key',
            'prefix' => 'https://sqs.us-east-1.amazonaws.com/your-account-id',
            'queue' => 'your-queue-name',
            'region' => 'us-east-1',
        ],
        ...

// Add in your config/app.php

'providers' => [
    '...',
    'Dusterio\AwsWorker\Integrations\LaravelServiceProvider',
];
 artisan schedule:run

// Add in your bootstrap/app.php
$app->register(Dusterio\AwsWorker\Integrations\LumenServiceProvider::class);

class PurgeCache implements ShouldQueue
{
    public static int $retention = 300; // If this job is delayed more than 300 seconds, skip it
}
config/queue.php