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

Поділитися
Вставка
  • Опубліковано 29 лис 2024

КОМЕНТАРІ • 65

  • @codewithdary
    @codewithdary  2 роки тому

    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 2 роки тому +3

    Perfect match for my requirements, thanks again, Dary.

  • @aseemlalfakawma5084
    @aseemlalfakawma5084 2 роки тому +2

    Very clear and concise. Thank you.

  • @sajidhasan5321
    @sajidhasan5321 Рік тому +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.

  • @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

  • @dev_jeongdaeri
    @dev_jeongdaeri 3 роки тому +1

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

  • @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

  • @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?

  • @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

  • @sylvesterouma5877
    @sylvesterouma5877 Рік тому +1

    Thanks. The best!!

  • @paschalokafor9043
    @paschalokafor9043 Рік тому +1

    thanks alot Dary.

    • @codewithdary
      @codewithdary  Рік тому

      I should be thanking you for watching :)

  • @nguyenvanthong1307
    @nguyenvanthong1307 2 роки тому

    so good, very easy to understand

  • @basopro
    @basopro 2 роки тому +1

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

    • @codewithdary
      @codewithdary  2 роки тому

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

  • @ali-d-coded5620
    @ali-d-coded5620 2 роки тому +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.

  • @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 ?

    • @emmanuelnkrumah-sarpong1179
      @emmanuelnkrumah-sarpong1179 Рік тому +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.

  • @constantine9074
    @constantine9074 9 місяців тому

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

  • @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 UA-camrs 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 :)

  • @Msnafiz
    @Msnafiz 2 роки тому

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

  • @neom6
    @neom6 3 роки тому

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

  • @birenjung
    @birenjung Рік тому +1

    loved it

  • @dogunfxdev8775
    @dogunfxdev8775 3 роки тому

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

  • @peterpardo4138
    @peterpardo4138 3 роки тому +1

    ur the best

  • @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

  • @noormohammadsiddiqui7737
    @noormohammadsiddiqui7737 3 роки тому +2

    ❤️❤️❤️

  • @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.

  • @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 роки тому

    ✌️