How To Use Queues In Laravel | Introduction To Queues | How To Use Queues

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

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

  • @codewithdary
    @codewithdary  3 года назад

    LETS CONNECT THROUGH INSTAGRAM.
    instagram.com/codewithdary

  • @terryhenyo9216
    @terryhenyo9216 3 года назад +2

    I like how you teach. You show simple examples that can easily be understood.

  • @abrpp
    @abrpp 3 года назад +6

    Always clear clean and easy to understand. Thank you

  • @adil.bashir
    @adil.bashir 3 года назад +3

    Perfect match for my requirements, thanks again, Dary.

  • @aseemlalfakawma5084
    @aseemlalfakawma5084 2 года назад +2

    Very clear and concise. Thank you.

  • @sajidhasan5321
    @sajidhasan5321 2 года назад +1

    This video is very helpful for me.
    Thank you brother🥰

  • @adilizm704
    @adilizm704 3 года назад

    simple and clean this makes me feel supper goooood i love this channel Keep going

  • @pro-learners5471
    @pro-learners5471 2 года назад +1

    thanks for the explanation. it really very easy to understand.

  • @julienSibille
    @julienSibille 3 года назад +4

    Hi, thank you !
    How do you handle queues in production ?

    • @codewithdary
      @codewithdary  3 года назад +1

      I came across the following article and it helped me a lot: laravel-news.com/how-to-run-workers-in-production

    • @asemmuhammad7922
      @asemmuhammad7922 3 года назад

      @@codewithdary what if i don't want to use forge?

    • @abrpp
      @abrpp 3 года назад +1

      @@asemmuhammad7922 scroll down there also explained how to setup without forge

  • @dev_jeongdaeri
    @dev_jeongdaeri 3 года назад +1

    really thanks!!! you are my hero!!!!

  • @nguyenvanthong1307
    @nguyenvanthong1307 2 года назад

    so good, very easy to understand

  • @ahmedabdel-salam7971
    @ahmedabdel-salam7971 3 года назад +1

    Excellent ❤️ , I hope you can explain all topics of laravel real time , Broadcast , events , , , etc and finally end with real time chat with laravel + Tailwind CSS Once again, thank you very much for your great effort

  • @sylvesterouma5877
    @sylvesterouma5877 Год назад +1

    Thanks. The best!!

  • @i_want_to_play
    @i_want_to_play 2 года назад +1

    Nice! Thanks! It's working!

  • @praveenmamidala7170
    @praveenmamidala7170 2 года назад +1

    thank you, I learned a lot from your video

  • @ali-d-coded5620
    @ali-d-coded5620 3 года назад +1

    but how can we use queues in production. we will have to run the command: php artisan queue:work for queue to take effect right. So is there any way to automate this artisan command when a certain condition is met ?

    • @eKarimoff
      @eKarimoff 2 года назад

      +++

    • @mudso
      @mudso 2 года назад

      Same question here.

  • @constantine9074
    @constantine9074 10 месяцев назад

    yeah.. but how to run it on production ,, since when you close terminal worker is terminated

  • @Msnafiz
    @Msnafiz 2 года назад

    Is there any option in shared hosting to serve queue workers?

  • @basopro
    @basopro 3 года назад +1

    thank',, what terminal tools do you use on mac?

    • @codewithdary
      @codewithdary  3 года назад

      I have iTerm 2 installed, really like using it :)

  • @neom6
    @neom6 3 года назад

    What is the number next to time in the terminal and how to rest it? Thanks

  • @alzahraaa.muhammed2164
    @alzahraaa.muhammed2164 2 года назад

    thanks for the explanation.
    but please, I have one Q is the queue:work command can run for just one row in the job table?

  • @paschalokafor9043
    @paschalokafor9043 Год назад +1

    thanks alot Dary.

    • @codewithdary
      @codewithdary  Год назад

      I should be thanking you for watching :)

  • @dogunfxdev8775
    @dogunfxdev8775 3 года назад

    mine always return failed job after excuting the queue work command
    please help

  • @mukeshprakash8112
    @mukeshprakash8112 Год назад +1

    For me the queue is getting failed. Kindly help please

    • @codewithdary
      @codewithdary  Год назад

      Can't help without any code or error.

    • @mukeshprakash8112
      @mukeshprakash8112 Год назад

      @@codewithdary I found at the error but still couldn't find the fix
      It's because of the attachment.
      I'm using fromPath() to access an image from the public folder to send the mail it's working normally but when I use the queue the location is somehow different. Give me a solution for that please

  • @mibrahim4245
    @mibrahim4245 2 года назад +1

    great as usual :D ..
    I've got a question.. someone said if you want to make a for loop of a HUGE database to search for users whose subscription has ended .. and then send an email to each one of them .. if you do that in a controller (that has the for loop and then dispatching the email jobs) .. you'll get a timeout error .. but if you do that in a "command" instead of a controller it will just work ..
    so is that correct ?
    does this php timeout depend on where the task is from "like if it is from the browser or the cli" or it is really different if its in a command class or a controller ?

    • @codewithdary
      @codewithdary  2 года назад +1

      You should change your Eloquent query where you only retrieve users whose subscription has ended, rather than getting them all and loopign over it!

    • @mibrahim4245
      @mibrahim4245 2 года назад

      @@codewithdary thank you Dary, but what if it is a heavy load .. do we get a timeout if we executed it through cli "not through a button on web for example" ? .. and does it make difference if that load is in a command or a controller ?

    • @nkrumahthis
      @nkrumahthis Год назад +1

      Controllers are meant for receiving requests from the user and then responding to them. It is expected that these requests be responded to as quickly as possible. Since the client that sent the request is waiting for a response, it has a set time it waits for the response. if no response by end of set time, it throws an error. hence the timeout.
      For what you are asking, it is likely that the task is not triggered by an end user or client. That task is likely done by an admin or someone else in-house. That should be done on a cli.
      You don't need to block the enduser thread with heavy tasks that the user has not initiated. Thus makes more sense to use a command than a controller. If the end-user initiates a time consuming task, put it in a queue.
      The right tool for the right job.

  • @mikidroidcom
    @mikidroidcom 2 года назад +1

    Dude answer questions on your comments...
    Do we have to run "artisan queue:work" on production? If true den how do we automate

    • @codewithdary
      @codewithdary  2 года назад

      I hope you realise how many comments me and other RUclipsrs get, it's very easy in your position to say "man answer to comments". If you do really want my help or others, just join the Discord man, that's my response :)

  • @birenjung
    @birenjung Год назад +1

    loved it

  • @peterpardo4138
    @peterpardo4138 3 года назад +1

    ur the best

  • @toxiedo8008
    @toxiedo8008 Год назад +1

    i got fail when run php artisan queue:work

    • @codewithdary
      @codewithdary  Год назад

      Can't really help if I don't know what you have done, what your queue is, what your error is.

  • @noormohammadsiddiqui7737
    @noormohammadsiddiqui7737 3 года назад +2

    ❤️❤️❤️

  • @iUmerFarooq
    @iUmerFarooq 3 года назад

    When you will be teaching Graphql then Laravel + Graphql?

    • @codewithdary
      @codewithdary  3 года назад

      I don't have that on my upcoming schedule, sorry.

    • @iUmerFarooq
      @iUmerFarooq 3 года назад

      @@codewithdary can you please make a video on what you have planned for your channel and the list?

  • @lijinv674
    @lijinv674 3 года назад

    ✌️