skip to Main Content

Just for context I do have 2 different Laravel projects.

  • project A – this is where I dispatch certain jobs
  • project B – this is where jobs being handled

I am using Laravel Homestead on my local setup, both projects are in Laravel version 10 and the Laravel Horizon is 5.16. Also take note that I only installed Laravel Horizon on project B.

As mentioned here, the command php artisan horizon should be executed on VM so I always open 2 command lines on my local setup and both are on vagrant ssh for project B’s directory, and below are the commands that I always execute:

  1. project B php artisan queue:work
  2. project B php artisan horizon

I also added HORIZON_PREFIX on .env file for both project A and project B as mentioned here and this key-value pair QUEUE_CONNECTION=redis.

The jobs are being processed since it is being prompted on the command line however there are no jobs for pending and completed jobs on to Laravel Horizon dashboard. Note that there are jobs being prompted on CLI for php artisan queue:work and CLI for php artisan horizon. Please kindly check the attached image.

I also tried running php artisan optimize:clear for both project A and project B.

I am confused right now. Please help.

enter image description here

I am expecting for the jobs to be shown on Laravel Horizon dashboard.
enter image description here
enter image description here

2

Answers


  1. Chosen as BEST ANSWER

    Finally!

    List for pending jobs and completed jobs are now visible.

    So what I did was install Laravel Horizon also on project A.

    Current setup now, both project A and B have Laravel Horizon same version.

    Note, I am just executing php artisan horizon on project B to start the process.

    enter image description here enter image description here


  2. I were struggling with this aswell, but it seems to be caused by php artisan cache:clear command.

    This command clears everything I horizon, which I personally wasn’t aware of.

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search