- Make all tests pass Client (V4),CRMV2,CRMV4 - Simplify client submodule path - Move App_url to .env.testing
30 lines
602 B
PHP
30 lines
602 B
PHP
<?php
|
|
|
|
namespace App\Jobs;
|
|
|
|
use App\Models\Brand;
|
|
use Illuminate\Bus\Queueable;
|
|
use Illuminate\Contracts\Queue\ShouldQueue;
|
|
use Illuminate\Foundation\Bus\Dispatchable;
|
|
use Illuminate\Queue\InteractsWithQueue;
|
|
|
|
class StartStatJobs implements ShouldQueue
|
|
{
|
|
use Dispatchable;
|
|
use InteractsWithQueue;
|
|
use Queueable;
|
|
|
|
/**
|
|
* Execute the job.
|
|
*
|
|
* @return void
|
|
*/
|
|
public function handle(): void
|
|
{
|
|
$brands = Brand::all();
|
|
foreach ($brands as $brand) {
|
|
\dispatch(new StatJob($brand))
|
|
->delay(rand(0, 90));
|
|
}
|
|
}
|
|
}
|