How to Set up Laravel Queues on Production
HTML-код
- Опубликовано: 28 сен 2024
- In this video, you can learn how to set up laravel queues on production.
queue-worker.conf
----------------------------------------------
[program:queue-worker]
process_name = %(program_name)s_%(process_num)02d
command=php /var/www/html/project-folder/artisan queue:listen
autostart=true
autorestart=true
user=root
numprocs=1
redirect_stderr=true
stdout_logfile=/var/www/html/project-folder/public/worker.log
⭐ Gadgets I am using for making video:
GoPro HERO8 Black Holiday Bundle Pack: amzn.to/3nQXXyr
Maono AU-400 Lavalier Microphone (Black): amzn.to/3k1HftI
Apple MacBook Pro: amzn.to/3177JTn
Samsung 27 inch (68.6 cm) Curved Bezel-Less LED Backlit Computer Monitor: amzn.to/3m0d8DV
Logitech MK215 Wireless Keyboard and Mouse Combo: amzn.to/2GQUpf3
⭐ My Favorite Python Books
- Python Crash Course: amzn.to/3178trD
- Automate the Boring Stuff with Python: amzn.to/3798C1I
- A Smarter Way to Learn Python: amzn.to/3iXWv9W
- Machine Learning for Absolute Beginners: amzn.to/2IwV1qB
- Hands-on Machine Learning with sci-kit-learn and TensorFlow: amzn.to/3j09kAv
-----------------------------SOCIAL-----------------------------
Github: github.com/cod...
Twitter: / techparida
Linkedin: / codingx
Facebook: / codingx
Instagram: / coding.x
Leave any questions in the comments section and don't forget to subscribe to be notified of new content! :)
Great tutorial !! thanks a lot ..
but I have a question, how could this work on shared hosting "where I have no CLI access" ?
is supervisor can handle websocket and scheduler?
How can I do this on heroku
Do we have to run "artisan queue:work" on production? If true den how do we automate
queue:work is a worker and it keeps on running as process in background and it will poll automatically your message from queue provider you have such as DB,redis or AWS sqs.
but this worker can get terminated sometime due to various reason so you have to use the supervisor which is a process manager and helps you to re-run your worker if it gets stopped
The same procefure will work on aws ec2 instance server ??
I have a request for multiple users and that's get allote of time to sent can u help me for this
Thanks for the tutorial many new things come in my observation.
But need a bit more help from you like if we want to view the status of the supervisor and how many jobs its currently running
Please also let me know how to do the same in cpanel based hosting and how we can enable and disable it from laravel interface
to see the supervisour status and all, simply you can enable supervisor web interface by adding these lines to your supervisord.conf file
[inet_http_server]
port=*:9001
username=admin
password=admin
thanks CodingX that's very help full
Thanks a lot !
Thank you guy
Super like 🙌