{"action":"created","issue":{"url":"https://api.github.com/repos/laravel/framework/issues/11458","labels_url":"https://api.github.com/repos/laravel/framework/issues/11458/labels{/name}","comments_url":"https://api.github.com/repos/laravel/framework/issues/11458/comments","events_url":"https://api.github.com/repos/laravel/framework/issues/11458/events","html_url":"https://github.com/laravel/framework/issues/11458","id":123459054,"number":11458,"title":"Redis Queue: Jobs are ending up in the queue without a $payload['job'] value. ","user":{"login":"jamesblackwell","id":1156154,"avatar_url":"https://avatars.githubusercontent.com/u/1156154?v=3","gravatar_id":"","url":"https://api.github.com/users/jamesblackwell","html_url":"https://github.com/jamesblackwell","followers_url":"https://api.github.com/users/jamesblackwell/followers","following_url":"https://api.github.com/users/jamesblackwell/following{/other_user}","gists_url":"https://api.github.com/users/jamesblackwell/gists{/gist_id}","starred_url":"https://api.github.com/users/jamesblackwell/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jamesblackwell/subscriptions","organizations_url":"https://api.github.com/users/jamesblackwell/orgs","repos_url":"https://api.github.com/users/jamesblackwell/repos","events_url":"https://api.github.com/users/jamesblackwell/events{/privacy}","received_events_url":"https://api.github.com/users/jamesblackwell/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-12-22T10:58:18Z","updated_at":"2015-12-22T11:35:44Z","closed_at":null,"body":"This is then causing the queue to crash because in /Jobs/Job.php resolveAndFire() and failed() methods both look for the 'job' value. It's undefined so the job never ends up as a failed job. \r\n\r\nI've verified looking at the list in redis directly that there is a \"job\" simply with an ID and attempts values:\r\n\r\n```\r\n\"{\\\"id\\\":\\\"2XB76hubeCDCRqP74lsB326oftfwMmsY\\\",\\\"attempts\\\":81441}\"\r\n```\r\nAs you can see, this is being retried repeatedly despite ---tries being set to 3.\r\n\r\nI'm not able to work out how these payloads are ending up there without a job field, which is clearly the root cause. However it would be useful if the failed() method at least could handle this undefined index. I'm sure this might be clearer to someone with more experience with the Queue code. \r\n\r\nI'm pretty certain the jobs that are missing the 'job' index are being added via $this->dispatch() method in the controller as opposed to the older Queue::push(), that we've been using for longer reliably. \r\n\r\nAlso using the same redis database for cache + sessions, though we've not had any problems before. This started soon after we started using the $this->dispatch() method in a controller with a "},"comment":{"url":"https://api.github.com/repos/laravel/framework/issues/comments/166590562","html_url":"https://github.com/laravel/framework/issues/11458#issuecomment-166590562","issue_url":"https://api.github.com/repos/laravel/framework/issues/11458","id":166590562,"user":{"login":"jamesblackwell","id":1156154,"avatar_url":"https://avatars.githubusercontent.com/u/1156154?v=3","gravatar_id":"","url":"https://api.github.com/users/jamesblackwell","html_url":"https://github.com/jamesblackwell","followers_url":"https://api.github.com/users/jamesblackwell/followers","following_url":"https://api.github.com/users/jamesblackwell/following{/other_user}","gists_url":"https://api.github.com/users/jamesblackwell/gists{/gist_id}","starred_url":"https://api.github.com/users/jamesblackwell/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jamesblackwell/subscriptions","organizations_url":"https://api.github.com/users/jamesblackwell/orgs","repos_url":"https://api.github.com/users/jamesblackwell/repos","events_url":"https://api.github.com/users/jamesblackwell/events{/privacy}","received_events_url":"https://api.github.com/users/jamesblackwell/received_events","type":"User","site_admin":false},"created_at":"2015-12-22T11:35:44Z","updated_at":"2015-12-22T11:35:44Z","body":"Using \"laravel/framework\": \"5.1.*\" in composer.json "}}