GithubHelp home page GithubHelp logo

laravelqueuewithhorizon's Introduction

Concurrent Job Processing using Laravel Horizon

Sending Jobs Concurrently with Laravel Horizon

Notes:

  • Redis must be installed and running on the server to use this application.
  • It does not work on Windows machines due to ext-pcntl extension issues. Use it on non-Windows machines.

Installation Steps

  1. Run composer update.

  2. Run php artisan key:generate.

  3. Run php artisan horizon:install.

  4. Update your .env file with the following configurations:

    • Configure mail settings:

      MAIL_MAILER=smtp
      MAIL_HOST=smtp.gmail.com
      MAIL_PORT=587
      MAIL_USERNAME=YOUR_MAIL_ADDRESS
      MAIL_PASSWORD="YOUR_PASSWORD"
      MAIL_ENCRYPTION=tls
      MAIL_FROM_ADDRESS=YOUR_MAIL_ADDRESS
      MAIL_FROM_NAME="MAIL_NAME"
    • Set QUEUE_CONNECTION to redis:

      QUEUE_CONNECTION=redis
    • Configure redis settings:

      REDIS_HOST=127.0.0.1
      REDIS_PASSWORD=null
      REDIS_PORT=6379
      REDIS_CLIENT=predis
  5. Run php artisan migrate (for database tables).

  6. Run php artisan horizon (to start Horizon).

  7. Open your browser and go to your-domain/horizon to access the Horizon Dashboard.


Note: Make sure to follow these steps in order. Also, ensure that Redis is installed and running.


Warning: This example not work on Windows machines. It is recommended to use it in a non-Windows environment.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.