我已经设置了laravel 5.5队列作业。
我有一个餐桌工作。并传递数据和用户ID。
然后,我想使用用户ID查询此作业,以显示该特定用户还剩下多少作业。
我尝试在作业中使用添加列,但是找不到插入用户ID的方法。
工作表:
id, queue, payload, attempts, reserved_at, user_id available_at, created_at
我的查询:
Jobs::where(user_id, 3)->get();
完成:
-Manage to add column in jobs
-Manage to query jobs but user_id is null in database
问题
-can't insert user_id, i don't know how i did a lot of research but no one seems to be doing this
-if only i could insert this user_id
代码:
ProcessTime::dispatch($chunk, $this->main_client_id);