Laravel Tutorial: Queue

Поделиться
HTML-код
  • Опубликовано: 27 сен 2024

Комментарии • 11

  • @mdabdullahilshafi
    @mdabdullahilshafi 6 лет назад

    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?

    • @mrdigitalau
      @mrdigitalau 5 лет назад

      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.

  • @meralmaradia4774
    @meralmaradia4774 4 года назад

    really helpful !!!

  • @Mark-nj2zh
    @Mark-nj2zh 7 лет назад +1

    Thanks! This was really helpful :)

  • @shojibflamon
    @shojibflamon 7 лет назад

    can you please make a tutorial about queue with supervisor?

  • @code-to-design
    @code-to-design 7 лет назад

    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?

    • @OverSeasMedia
      @OverSeasMedia  7 лет назад +2

      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 .

  • @premiumrealtyng
    @premiumrealtyng 7 лет назад

    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

    • @fabianquiroz4075
      @fabianquiroz4075 6 лет назад

      Do you have the answers ? I'm developing a background upload...and need to know if this queue it's usesfull !!

    • @whotfevencares
      @whotfevencares 4 года назад +1

      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.

    • @premiumrealtyng
      @premiumrealtyng 4 года назад

      @@whotfevencares thanks. This reply will help someone in the future 🤗
      I'm using supervisor now as well