41 lines
898 B
PHP
41 lines
898 B
PHP
<?php
|
|
|
|
namespace App\Jobs\MassInsert;
|
|
|
|
use App\Tasks\MassInsert\MassInsert1Task;
|
|
use App\Tasks\MassInsert\MassInsert2Task;
|
|
use App\Tasks\MassUpdate\Group1\MassUpdate1Task;
|
|
use Illuminate\Bus\Queueable;
|
|
use Illuminate\Contracts\Queue\ShouldQueue;
|
|
use Illuminate\Foundation\Bus\Dispatchable;
|
|
use Illuminate\Queue\InteractsWithQueue;
|
|
use Illuminate\Queue\SerializesModels;
|
|
|
|
class MassInsert2Job implements ShouldQueue
|
|
{
|
|
use Dispatchable, InteractsWithQueue, Queueable, SerializesModels;
|
|
|
|
/**
|
|
* The number of seconds the job can run before timing out.
|
|
*
|
|
* @var int
|
|
*/
|
|
public $timeout = 3600; //20min
|
|
|
|
/**
|
|
* Create a new job instance.
|
|
*/
|
|
public function __construct(public int $count)
|
|
{
|
|
//
|
|
}
|
|
|
|
/**
|
|
* Execute the job.
|
|
*/
|
|
public function handle(): void
|
|
{
|
|
(new MassInsert2Task())->handle($this->count);
|
|
}
|
|
}
|