Hello,
I have an old Laravel 5.4 app that was running a Redis queue just fine until I decided to try and mess with it. I have Horizon running on a different app on the same server, so I thought I'd try and see if I could get Horizon to manage the 5.4 app's queue too. Needless to say, it didn't work.
My 5.4 app has 308 "delayed" jobs (I say delayed because they are queued but have not run, even after switching on my queue listener again), and nothing I do seems to make them run. Does anyone know what I can do to trigger the queue to run them? I have tried everything I can think of, from artisan queue:listen to artisan queue:work --queue=default and artisan queue:retry all
I use Laravel Forge and my Queue Worker is set up like so:
| Connection | Queue | Timeout | Processes | Tries | Daemon |
|-----------------|------------|-------------|-----------------|---------|------------|
| redis | default | 60 | 1 | 3 | Yes |
Here's the output of some commands using Tinker:
>>> Redis::llen('queues:default');
=> 308
>>> Redis::lrange('queues:default', 0, -1);
=> [
"{"displayName":"Modules\Lesson\Mail\Parties\Customer\ApprovedMessage","job":"Illuminate\Queue\CallQueuedHandler@call","maxTries":null,"timeout":null,"data":{"commandName":"Illuminate\Mail\SendQueuedMailable","command":"O:34:\"Illuminate\Mail\SendQueuedMailable\":3:{s:8:\"mailable\";O:52:\"Modules\Lesson\Mail\Parties\Customer\ApprovedMessage\":17:{s:3:\"mes\";O:45:\"Illuminate\Contracts\Database\ModelIdentifier\":2:{s:5:\"class\";s:29:\"Modules\Lesson\Entities\Party\";s:2:\"id\";i:488;}s:4:\"from\";a:0:{}s:2:\"to\";a:1:{i:0;a:2:{s:4:\"name\";N;s:7:\"address\";s:24:\"<redacted>\";}}s:2:\"cc\";a:0:{}s:3:\"bcc\";a:0:{}s:7:\"replyTo\";a:0:{}s:7:\"subject\";N;s:11:\"\u0000*\u0000markdown\";N;s:4:\"view\";N;s:8:\"textView\";N;s:8:\"viewData\";a:0:{}s:11:\"attachments\";a:0:{}s:14:\"rawAttachments\";a:0:{}s:9:\"callbacks\";a:0:{}s:10:\"connection\";N;s:5:\"queue\";N;s:5:\"delay\";N;}s:5:\"tries\";N;s:7:\"timeout\";N;}"},"id":"bZOqJGw5tykWTR6ZcW8JTEz3aAYy26nP","attempts":0}",
"{"displayName":"Modules\Lesson\Mail\Parties\Customer\GalleryMessage","job":"Illuminate\Queue\CallQueuedHandler@call","maxTries":null,"timeout":null,"data":{"commandName":"Illuminate\Mail\SendQueuedMailable","command":"O:34:\"Illuminate\Mail\SendQueuedMailable\":3:{s:8:\"mailable\";O:51:\"Modules\Lesson\Mail\Parties\Customer\GalleryMessage\":18:{s:3:\"mes\";O:45:\"Illuminate\Contracts\Database\ModelIdentifier\":2:{s:5:\"class\";s:29:\"Modules\Lesson\Entities\Party\";s:2:\"id\";i:488;}s:5:\"token\";O:45:\"Illuminate\Contracts\Database\ModelIdentifier\":2:{s:5:\"class\";s:28:\"Modules\Art\Entities\Gallery\";s:2:\"id\";i:579;}s:4:\"from\";a:0:{}s:2:\"to\";a:1:{i:0;a:2:{s:4:\"name\";N;s:7:\"address\";s:24:\"<redacted>\";}}s:2:\"cc\";a:0:{}s:3:\"bcc\";a:0:{}s:7:\"replyTo\";a:0:{}s:7:\"subject\";N;s:11:\"\u0000*\u0000markdown\";N;s:4:\"view\";N;s:8:\"textView\";N;s:8:\"viewData\";a:0:{}s:11:\"attachments\";a:0:{}s:14:\"rawAttachments\";a:0:{}s:9:\"callbacks\";a:0:{}s:10:\"connection\";N;s:5:\"queue\";N;s:5:\"delay\";N;}s:5:\"tries\";N;s:7:\"timeout\";N;}"},"id":"xKRehjPR4BjUjIyZH7txNeRnAAdTLZqP","attempts":0}",
...many more queued jobs...
]
>>> Redis::zcount('queues:default:delayed', '-inf', '+inf');
=> 8
>>> Redis::zcount('queues:default:reserved', '-inf', '+inf');
=> 0