PHP code example of mrfelipemartins / oxide-laravel

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

    

mrfelipemartins / oxide-laravel example snippets


'connections' => [
    'oxide' => [
        'driver' => 'oxide',
        'host' => env('OXIDE_HOST', '127.0.0.1'),
        'port' => (int) env('OXIDE_PORT', 7379),
        'auth_token' => env('OXIDE_AUTH_TOKEN'),
        'queue' => env('OXIDE_QUEUE', 'default'),
        'retry_after' => (int) env('OXIDE_RETRY_AFTER', 90),
        'block_for' => env('OXIDE_BLOCK_FOR') !== null
            ? (int) env('OXIDE_BLOCK_FOR')
            : null,
        'after_commit' => false,
    ],
],

ProcessPodcast::dispatch($podcast);
ProcessPodcast::dispatch($podcast)->onConnection('oxide')->onQueue('high');
ProcessPodcast::dispatch($podcast)->delay(now()->addMinutes(5));

public function oxideLaneKey(): ?string
{
    return 'account:' . $this->accountId;
}

public function oxidePriority(): int
{
    return 10;
}

public function oxideHeaders(): array
{
    return ['tenant_id' => (string) $this->tenantId];
}
bash
php artisan vendor:publish --tag=oxide-queue-config
bash
php artisan queue:work oxide --queue=high,default
php artisan queue:monitor oxide:default --max=1000
php artisan queue:clear oxide --queue=default --force