Laravel 中用 Redis 作为队列的驱动遇到的问题 Undefined index: job ?
我们用的laravel-5.1.24,队列用的redis
队列失败时报
pro.ERROR: exception 'ErrorException' with message 'Undefined index: job' in vendor/laravel/framework/src/Illuminate/Queue/Jobs/Job.php:125
正常情况下队列失败的话payload字段的格式是
{"job":"Illuminate\\Queue\\CallQueuedHandler@call","data":{"command":"O:26:\"App\\Commands\\InsertCrmUser\":10:{s:8:\"mt4_real\";s:6:\"767913\";s:3:\"pid\";s:0:\"\";s:2:\"ne\";s:35:\"lp=bdt35,pid=,unit=,key=,source=web\";s:16:\"user_affiliation\";N;s:13:\"user_classify\";N;s:8:\"url_from\";s:32:\"https:\/\/demo.tigerwit.com\/space\/\";s:11:\"invite_code\";N;s:6:\"\u0000*\u0000job\";N;s:5:\"queue\";s:4:\"sync\";s:5:\"delay\";N;}"},"id":"KUXb8JVmANy7WpOibz9c3ETLelDolLVv","attempts":4}
有的时候失败就变成了这样
{\"id\":\"RJR9lUEDL14EA5fgHrIFQFRi1tiM0ZMf\",\"attempts\":4}
没有job对象的就没办法retry,有人遇到这个问题吗?