标签:turn imp 构造 this -- obs space should names
定义延迟队列的两种方式\App\Jobs\Jober::dispatch()->delay(20);
<?php
namespace App\Jobs;
---------------------------------------------------
class Timer implements ShouldQueue
{
-----------------------------------------------
public function __construct()
{
$this->delay(20);
}
/**
* Execute the job.
* @return void
*/
public function handle()
{
---------------------------------------------------
}
}
delay
属性指定<?php
namespace App\Jobs;
---------------------------------------------------
class Timer implements ShouldQueue
{
public $delay = 30;
-----------------------------------------------
public function __construct()
{
}
/**
* Execute the job.
* @return void
*/
public function handle()
{
---------------------------------------------------
}
}
标签:turn imp 构造 this -- obs space should names
原文地址:https://blog.51cto.com/suiwnet/2428598