Dinesh Uprety
@dineshuprety ·
Public
Configure queued jobs with attributes
PHPLaravel 13 API example based on official Laravel documentation. Source: https://laravel.com/docs/13.x/releases#expanded-php-attributes
PHP
CodeSnap // free canvas
Configure queued jobs with attributes
<?php
use Illuminate\Queue\Attributes\Backoff;
use Illuminate\Queue\Attributes\Timeout;
use Illuminate\Queue\Attributes\Tries;
#[Tries(5)]
#[Backoff(10, 30, 90)]
#[Timeout(120)]
final class SyncInventory implements ShouldQueue
{
// ...
}
// Further reading: https://laravel.com/docs/13.x/releases#expanded-php-attributes