Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Repository files navigation

Queue Tests

Laravel Queue Processing System

A simple Laravel app that handles payment processing using queues and Redis. It's built to be reliable and easy to monitor.

What's Inside

  • Payment processing using Laravel queues
  • Redis for handling the queue
  • Jobs that retry automatically if they fail
  • Proper error handling and logging
  • A command to check if the queue is healthy "half done"
  • An API endpoint to create orders

Getting Started

Using Laravel Sail

  1. Start everything up:
./vendor/bin/sail up -d
  1. Run the migrations:
./vendor/bin/sail artisan migrate
  1. Run the tests:
./vendor/bin/sail artisan test

4 - Run horizon queue

./vendor/bin/sail artisan horizon
  1. Check your jobs in Horizon:
http://localhost/horizon/
  1. Test the queue with this curl command to simulate the API call of create order:
curl -X POST http://localhost/api/create-order \
  -H "Content-Type: application/json" \
  -H "Accept: application/json" \
  -d '{
    "user_id": 1,
    "amount": 51231.00
  }'

Future Improvements

  • Add batching for failed jobs
  • Set up alerts and notifications
  • Add more monitoring features

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages