33 lines
683 B
PHP
33 lines
683 B
PHP
<?php
|
|
|
|
namespace App\Jobs;
|
|
|
|
use Illuminate\Bus\Queueable;
|
|
use Illuminate\Contracts\Queue\ShouldQueue;
|
|
use Illuminate\Foundation\Bus\Dispatchable;
|
|
use Illuminate\Queue\InteractsWithQueue;
|
|
use Illuminate\Queue\SerializesModels;
|
|
|
|
class BaseJob implements ShouldQueue
|
|
{
|
|
use Dispatchable, InteractsWithQueue, Queueable, SerializesModels;
|
|
|
|
/**
|
|
* 队列名称,默认 [default]
|
|
* @var string|null
|
|
*/
|
|
public $queue;
|
|
|
|
/**
|
|
* 任务可以执行的秒数 (超时时间)。
|
|
* @var int
|
|
*/
|
|
public $timeout = 300;
|
|
|
|
/**
|
|
* 任务可以尝试的最大次数。
|
|
* @var int
|
|
*/
|
|
public $tries = 1;
|
|
}
|