Thanks for this helpfully explained video. Can you tell me, when the app is in production, how you will handle running the "php artisan queue:work" command?
You can log in via ssh and run php artisan queue:work, but that's not efficient because you have to keep SSH open. Instead, use something called Supervisor which runs your artisan commands without you needing to be logged in. Google supervisor and laravel.
email can be sent later on. however when is file uploaded it should be saved on server. wont it be frustrating to make user wait or is it for resource optimization of server?
Let's a more concret example: say you have an uploaded photo say that you want to resize (8K or something) an uploaded photo 2000 times and maybe do some magic to it filters and stuff that would take time, that would take a whole lot of time, so instead of doing that in the controller and keep the user waiting you queue it and the server is going to keep looking for jobs in the queue and execute them like, the code in your controller will continue to execute after sending the job to the queue . So basically you do this just so that user doesn't have to wait for a heavy task to be executed .
Wow. Very helpful! 1. How do you run the queue work when the site is already hosted on the server[production] ? 2. How do you check when a job has finished running? Say you want to notify the user of the completed task. Thanks in anticipation
I know this is two years old. But I am going to answer this for future people. 1) Yes. You should use supervisor to run the queue handler and make it a background task 2) You can use Job events to execute specific functions according to it's event.
Thanks for this helpfully explained video.
Can you tell me, when the app is in production, how you will handle running the "php artisan queue:work" command?
You can log in via ssh and run php artisan queue:work, but that's not efficient because you have to keep SSH open. Instead, use something called Supervisor which runs your artisan commands without you needing to be logged in. Google supervisor and laravel.
really helpful !!!
Thanks! This was really helpful :)
can you please make a tutorial about queue with supervisor?
email can be sent later on. however when is file uploaded it should be saved on server. wont it be frustrating to make user wait or is it for resource optimization of server?
Let's a more concret example: say you have an uploaded photo say that you want to resize (8K or something) an uploaded photo 2000 times and maybe do some magic to it filters and stuff that would take time, that would take a whole lot of time, so instead of doing that in the controller and keep the user waiting you queue it and the server is going to keep looking for jobs in the queue and execute them like, the code in your controller will continue to execute after sending the job to the queue .
So basically you do this just so that user doesn't have to wait for a heavy task to be executed .
Wow. Very helpful!
1. How do you run the queue work when the site is already hosted on the server[production] ?
2. How do you check when a job has finished running? Say you want to notify the user of the completed task.
Thanks in anticipation
Do you have the answers ? I'm developing a background upload...and need to know if this queue it's usesfull !!
I know this is two years old. But I am going to answer this for future people.
1) Yes. You should use supervisor to run the queue handler and make it a background task
2) You can use Job events to execute specific functions according to it's event.
@@whotfevencares thanks. This reply will help someone in the future 🤗
I'm using supervisor now as well