问题描述
基于Laravel的文档来延迟工作,我们可以在侦听器类(https://laravel.com/docs/8.x/events)上添加$ delay属性。我正在尝试根据我的开始时间和结束时间以秒为单位自定义$ delay时间。
可以正常工作的文档中提供的信息:
/**
* The time (seconds) before the job should be processed.
*
* @var int
*/
public $delay = 60;
我正在尝试:
public $delay;
public function __construct ($event) {
$this->delay= $event->seconds;
}
并且我尝试过此操作以确保它可以正常工作,但不幸的是:
public $delay;
public function __construct () {
$this->delay= "60";
}
解决方法
暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!
如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。
小编邮箱:dio#foxmail.com (将#修改为@)