Learn Django Celery with RabbitMQ - Install and create new celery instance, Run a simple task Part 1

Поділитися
Вставка
  • Опубліковано 26 січ 2025

КОМЕНТАРІ • 108

  • @ShubhamSharma-ym4db
    @ShubhamSharma-ym4db 2 роки тому +24

    Thank you for this tutorial. I first viewed this around a year and half back, still new in my career as a software developer when I was pretty much clueless about most of the things. This tutorial played a very important role in my growth as a developer. I have now deployed a system on Django+Celery+RabbitMQ which has been used by more than a million users.

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

      good job shubham. would you mind me asking Was it a personal project or client project? how did you approach the problem initially ?

    • @shubhamraj25
      @shubhamraj25 Рік тому +2

      millions!?? proof or it did'nt happen

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

    Thank you, was easy and we'll explained... So much better than the majority of Celery videos on UA-cam

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

    Celery and instance is the most random couple of words. I love it.

  • @vikramray1837
    @vikramray1837 4 роки тому +2

    The most underestimated channel.

    • @veryacademy
      @veryacademy  4 роки тому +1

      Thank you, its all good 👍

    • @vikramray1837
      @vikramray1837 4 роки тому

      @@veryacademy Thanks for all the playlists. By watching your video I have solved a real-life problem for scheduling at my work.

  • @subhendupanda7454
    @subhendupanda7454 4 роки тому +3

    It’s just wao👌🏻simple, clean and clear !
    It helped, Thanks for sharing...waiting for part-2.

    • @veryacademy
      @veryacademy  4 роки тому +1

      Thank you, we will get back into Celery, - at this minute we are on a Django RESTful API mission - got around 10 more of those to go then will focus on such things as Celery again 👍

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

    Thank you so much, it finally worked!

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

      I’m recording a new example should be out tomorrow if I can keep the kids busy

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

      @@veryacademy haha, a stranger wishes them all the very best in life.

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

    Can you explain it to me? When I use add.delay(4,4) the celery console shows like so (received) [2023-08-30 11:37:23,011: INFO/MainProcess] Task app1.tasks.minus[332b6621-a785- 45cc-aaec-ad0b10be8719] received doesn't display the value 8, why? Thank you!

  • @radosny7897
    @radosny7897 4 роки тому +1

    Very well explained! Thanks.

  • @mustafaalbaghdadi85
    @mustafaalbaghdadi85 4 роки тому +1

    Nicely put, thank you for the video.
    I will be following this series 👍🏼

    • @veryacademy
      @veryacademy  4 роки тому +1

      Thank you Steve, work has moved away from celery for a little while but we will be back.

    • @mustafaalbaghdadi85
      @mustafaalbaghdadi85 4 роки тому

      @@veryacademy I noticed that, you have good content I subscribed for future reference.
      Good luck 🙏🏼

  • @yashsonar5750
    @yashsonar5750 4 роки тому +1

    Thank you for this explanation!

  • @goodlearner2379
    @goodlearner2379 4 роки тому +1

    Wow amazing!!! Made my day 😍

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

    not enough values to unpack (expected 3, got 0) 18:11

  • @mahmudsajib8648
    @mahmudsajib8648 4 роки тому

    Eagerly waiting for next part ❤

    • @veryacademy
      @veryacademy  4 роки тому

      As am I! Thank you kindly, it wont be long!

  • @AliAbdullah-oi3wc
    @AliAbdullah-oi3wc 3 роки тому +1

    Great demo

  • @rakeshkumarbhol7072
    @rakeshkumarbhol7072 4 роки тому +2

    Thank you for explaining this.. It will be helpful for me if you made a video for windows as installation of celery in windows is quite hard.. Thanks again..

  • @adityamagarde3872
    @adityamagarde3872 4 роки тому +1

    Great tutorial..

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

    14:04 import celery could not be resolved

  • @AbrahamMelo-u6h
    @AbrahamMelo-u6h 4 місяці тому

    what if we want to use another broker like Azure services bus?

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

    nice tutorial if you can make a video on windows server it would be great

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

      Hi Fady, people still use Windows Server? 😁 I joke - what were you thinking? You just want to implement this on Windows Server?

  • @zakchips
    @zakchips 4 роки тому +1

    Thanks a lot.
    I almost gave up using rabbitmq as a broker. But finally succeeded ( don't know for how long).
    Few tips for people who use Linux on Windows10:
    1. instead of "sudo systemctl start rabbitmq-server" command try "sudo service rabbit-server start" otherwise there is an error msg( System has not been booted with systemd as init system (PID 1). Can't operate)
    2. if you get an error during $celery -A yourapp worker -L info: "WSL: ERROR/MainProcess] consumer: Cannot connect to amqp://guest:**@127.0.0.1:5672//: Socket closed
    try localhost:15672 using guest/guest as credentials. Look for Overview page>Ports and Contexts.
    (see also ) localhost:15672/#/connections
    look whether you need to change IP6 to IP4, if so you need to $ sudo nano /etc/rabbitmq/rabbitmq-env.conf and uncomment NODE_IP_ADDRESS=127.0.0.1 in that config.

    • @veryacademy
      @veryacademy  4 роки тому

      Thank you! Hopefully that will be of use to many others. I was using a VM to perform this tutorial. VMWARE with Ubuntu 20.04.1 LTS. I will make it clearer and make it known the exact setup in future to help others. Its always a pain when you spend hours just trying to get things installed. I will do a few more videos on installations etc to support other too. Thank you again!

    • @zakchips
      @zakchips 4 роки тому

      @@veryacademy As far as i understand the installation of rabbitmq is a pain. That's why you don't see many tutorials about it. Seems that celery & radis cause less headache. Hope that it' gets easier during the real deployment (on real UNIX ). Unfortunately I don't have experience with it. Even in case of celery + redis = it's still unclear for me how a superviser can boot the process. I'll be very grateful to you if you let us know how to set up this essential part of almost any webapp in deployment.

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

    Thanks for this. However, it would be nice to show how to remove the tasks from the queue. I edited the function, but it still keeps giving me the old result.

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

      Thank you - yeah, there is a lot more we can do with this. I will have a much more substantial celery offering soon.

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

    Thank you for this, can we build activity streams with this.

  • @down__lo7359
    @down__lo7359 4 роки тому +2

    Great videos, learning lots. Curios if you would be able to do a celery video showing a progress bar in the view to the user to show task progress?

    • @veryacademy
      @veryacademy  4 роки тому +1

      Thank you for the suggestion - I have added it to the list of todo. Cant promise when it will be done.

    • @down__lo7359
      @down__lo7359 4 роки тому +1

      @@veryacademy great, thanks for considering.

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

      There is a python module called celery progress.

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

    Thanks for your simple exlanation , also please add requirements.txt in github repo .

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

      Sorry about that - I had forgot

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

    thanks ! very good video

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

    Thanks man you saved my ass 🔥🔥

  • @Punderland
    @Punderland 4 роки тому +1

    So I am a beginner and wanna ask, how asynchronous could help in multiple access to the server? I asked ard and ended up here. But I dont seem to get it why this could help in handling multiple requests?

    • @veryacademy
      @veryacademy  4 роки тому +1

      Hi Punderland, good question. Asynchronous in web terms and being very general means that not only the user can send requests to the server - the server can also send to the user without a request from the user. So we normally send messages to the server from our browser using HTTP requests for example, but in order for the server to send a message back we have to first send a message to it. HTTP is not asynchronous. Using for example web sockets (WS) replacing http we can send requests to the server and the server can send messages back to un independent of whether we sent it a message first. So your question - from what I understand - you are asking - how async could help make multiple requests to access the server. This question implies you are talking only about making a request to the server - a one way connection and not a two way connection which async is all about. So the answer is - there isn't any real benefit.

    • @Punderland
      @Punderland 4 роки тому

      @@veryacademy so this could not help dynamic access of multiple users, right?
      But it can create a memory of requests to be processed later and send back to clients as a delayed response?

    • @Punderland
      @Punderland 4 роки тому

      @@veryacademy and pls if u could, any keyword i shld look for next on my quest lol

    • @veryacademy
      @veryacademy  4 роки тому

      Hey Punderland - happy to help. There is a lot of different terminology you are using which makes it difficult for me to answer clearly. You mention dynamic access (which is a little unclear for example) dynamic is a very generic word which could mean many things. How about you tell me what you want to do/make/build and I will direct you to the right place 👍

    • @Punderland
      @Punderland 4 роки тому

      @@veryacademy thanks for ur passion. I wanna make a server that runs script upon receiving user http request. Right now i made a django server following common tutorials. it only runs once per request while other request queing up behind. (I send with three browsers and reponses come back in order) And no immediate response could give back users while they wait.
      What i want is multiple instances could run along side to process 3 requests at once together. What should i do??😔

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

    why does my task not show results after being recieved by the worker?

  • @shivamshah6854
    @shivamshah6854 4 роки тому +1

    what is diff between redis server and rabbitmq ?

    • @veryacademy
      @veryacademy  4 роки тому

      They are the same type of technology - did you want something a little bit more particular?

    • @shivamshah6854
      @shivamshah6854 4 роки тому

      @@veryacademy yes

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

    Thank you 😀

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

    Unit rabitmq-server.service could not be found.
    I have similar error with redis. Why this happen? Please help if someone knows.

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

      Hi Emil, this is a tricky one to resolve - I would recommend if you are on Windows to use Docker or Heroku Redis service

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

      @@veryacademy Thank you for your response. Finally someone answered me. I want to thank you a lot for your response.
      I am on Ubuntu 20.04 unfortunately. I had same error when I tried locally redis (not found) and online with heroku (cannot connect to socket, error 104, smth like this).
      This took me the 2 whole days still cannot resolve.
      Docker is my last chance. I will let you know if manage to resolve this issue.

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

      @@emilseyfullayev1638 Please keep me posted. We can get this sorted.

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

      I had a typo (rabBit - rabit). Sorry for disturbance. So, it worked with rabbitmq-server
      But again, I receive the error when connecting to heroku redis:
      [2021-04-11 19:58:44,253: ERROR/MainProcess] consumer: Cannot connect to redis://:**@ec2-54-217-183-159.eu-west-1.compute.amazonaws.com:22600//: Error while reading from socket: (104, 'Connection reset by peer').
      Trying again in 26.00 seconds... (13/100)
      If you could help me with this also I would be very grateful. Thank you a lot anyway for your great tutorials.

  • @윤상운-f2o
    @윤상운-f2o 2 роки тому

    Thank you

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

    please show commands for the Windows terminal also...

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

    When I deploy the Project Live, how to install RabbitMQ there?

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

      Your deployment environment might have separate provision for it or else just install and configure it. Likely the server is using Linux.

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

      @@veryacademy
      Thanks for replying 🥰
      Is it available in GoDaddy?
      If yes, can u provide link or something to how to do that.
      If no,does any other hosting provider supports it?
      Kikdly share the name and link to how to configure it

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

      @@ajinzrathod Hi, GoDaddy - I wouldn't expect so. You need a service such as Heroku or Digital Ocean. It isn't a straight forward process for me to link unfortunately.

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

      @@veryacademy Ok Thanks ❤️❤️

  • @priteshambavane7328
    @priteshambavane7328 4 роки тому +1

    How to go to worker in vscode @18:11

    • @veryacademy
      @veryacademy  4 роки тому

      I have multiple terminal windows open in visual studio code, I selected it from the dropdown list

  • @VIVEKTIWARI-oc2jn
    @VIVEKTIWARI-oc2jn 3 роки тому +1

    Hi sir, please make video on django-pushnotifications (web, android,ios) THanks

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

      Noted it down - thank you - anymore suggestions keep them coming

  • @codewithfarhad8594
    @codewithfarhad8594 4 роки тому +1

    this guy sounds almost like @thenetninja 👍😍

    • @veryacademy
      @veryacademy  4 роки тому +2

      Interesting - a few people have said this 😁 Well I guess that can only be a good thing if it helps reach the same level at that great channel!

    • @codewithfarhad8594
      @codewithfarhad8594 4 роки тому

      @@veryacademy indeed. I'm glad you are out here helping us with your awesome explanations.
      so that said I was wondering, could you do a video on django custom management command with contrab or scheduling? I searched for such a video and didn't find one.
      in my django, I want to accomplish a task where I have to mark some chatrooms inactive after 3 hours and do it automatically so I checked these videos to see if celery could solve that problem but although I didn't get exactly what I was looking for but it definitely pointed me in the right direction which is using Django custom management commands + contrab so please do a video on this topic!

    • @backend-cataphract
      @backend-cataphract 3 роки тому

      i said the same in another video haha

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

    Thank you!

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

    Please make some schematics and go through the concepts a little quicker

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

    thanks a lot

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

    How can we do this with drf?

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

      Sure, I cant give you a timeframe for this though at the moment

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

    You are awesome!

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

    Celery 5 is not working on Windows! is there an alternative ?

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

    great!

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

    please note : run the rabbit server outside the vir env

  • @dinmukhammedtleuzhanuly1225
    @dinmukhammedtleuzhanuly1225 Місяць тому

    Thanks u!

  • @combustionFreeEngine
    @combustionFreeEngine 4 роки тому

    Thanks You!

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

    Windows installation guide, please

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

      Noted Daniel. I would be recommending Docker though and not install on your machine (which can be a pain to do)

  • @ankitgupta9155
    @ankitgupta9155 4 роки тому +1

    Waiting for chat app 🙄☺️

  • @Antinormanisto
    @Antinormanisto 6 місяців тому

    It's so difficult

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

    what's ur age ?

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

    what is ubuntu? how to install? stuck

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

    in settings if u use reddis add:
    CELERY_BROKER_URL = "redis://localhost:6379/0"
    other wise ERRR 61