我在作业队列中的跟踪标签未显示我期望的标签。转班后作业不处理。
我的工作示例课程是:
class EmailUser implements ShouldQueue
{
use Dispatchable, InteractsWithQueue, Queueable, SerializesModels;
/**
* The user instance.
*
* @var \App\User
*/
public $user;
/**
* Create a new job instance.
*
* @param \App\User $user
* @return void
*/
public function __construct(User $user)
{
$this->user = $user;
}
/**
* Execute the job.
*
* @return void
*/
public function handle()
{
Mail::to('fesher@example.com')->send(new ApplicationReceivedEmail());
}
/**
* Get the tags that should be assigned to the job.
*
* @return array
*/
public function tags()
{
return ['email', 'user:'.$this->user];
}
}
现在,在我手动标记作业类电子邮件之前,它们会正常发送并且一切正常。添加标签方法杀死进程,不再正常发送电子邮件。
我从这里的网站示例https://laravel.com/docs/5.5/horizon#tags
有人可以帮忙吗?谢谢