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.
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 👍
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!
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..
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.
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!
@@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.
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.
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?
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.
@@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?
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 👍
@@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??😔
@@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.
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.
@@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
@@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.
@@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!
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.
good job shubham. would you mind me asking Was it a personal project or client project? how did you approach the problem initially ?
millions!?? proof or it did'nt happen
Thank you, was easy and we'll explained... So much better than the majority of Celery videos on UA-cam
Celery and instance is the most random couple of words. I love it.
The most underestimated channel.
Thank you, its all good 👍
@@veryacademy Thanks for all the playlists. By watching your video I have solved a real-life problem for scheduling at my work.
It’s just wao👌🏻simple, clean and clear !
It helped, Thanks for sharing...waiting for part-2.
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 👍
Thank you so much, it finally worked!
I’m recording a new example should be out tomorrow if I can keep the kids busy
@@veryacademy haha, a stranger wishes them all the very best in life.
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!
Very well explained! Thanks.
Glad it was helpful!
Nicely put, thank you for the video.
I will be following this series 👍🏼
Thank you Steve, work has moved away from celery for a little while but we will be back.
@@veryacademy I noticed that, you have good content I subscribed for future reference.
Good luck 🙏🏼
Thank you for this explanation!
You're very welcome!
Wow amazing!!! Made my day 😍
Glad you liked it!!
not enough values to unpack (expected 3, got 0) 18:11
Eagerly waiting for next part ❤
As am I! Thank you kindly, it wont be long!
Great demo
👍
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..
Glad it helped
Great tutorial..
Thank you!
14:04 import celery could not be resolved
what if we want to use another broker like Azure services bus?
nice tutorial if you can make a video on windows server it would be great
Hi Fady, people still use Windows Server? 😁 I joke - what were you thinking? You just want to implement this on Windows Server?
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.
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!
@@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.
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.
Thank you - yeah, there is a lot more we can do with this. I will have a much more substantial celery offering soon.
Thank you for this, can we build activity streams with this.
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?
Thank you for the suggestion - I have added it to the list of todo. Cant promise when it will be done.
@@veryacademy great, thanks for considering.
There is a python module called celery progress.
Thanks for your simple exlanation , also please add requirements.txt in github repo .
Sorry about that - I had forgot
thanks ! very good video
Thanks man you saved my ass 🔥🔥
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?
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.
@@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?
@@veryacademy and pls if u could, any keyword i shld look for next on my quest lol
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 👍
@@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??😔
why does my task not show results after being recieved by the worker?
what is diff between redis server and rabbitmq ?
They are the same type of technology - did you want something a little bit more particular?
@@veryacademy yes
Thank you 😀
Unit rabitmq-server.service could not be found.
I have similar error with redis. Why this happen? Please help if someone knows.
Hi Emil, this is a tricky one to resolve - I would recommend if you are on Windows to use Docker or Heroku Redis service
@@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.
@@emilseyfullayev1638 Please keep me posted. We can get this sorted.
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.
Thank you
please show commands for the Windows terminal also...
When I deploy the Project Live, how to install RabbitMQ there?
Your deployment environment might have separate provision for it or else just install and configure it. Likely the server is using Linux.
@@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
@@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.
@@veryacademy Ok Thanks ❤️❤️
How to go to worker in vscode @18:11
I have multiple terminal windows open in visual studio code, I selected it from the dropdown list
Hi sir, please make video on django-pushnotifications (web, android,ios) THanks
Noted it down - thank you - anymore suggestions keep them coming
this guy sounds almost like @thenetninja 👍😍
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!
@@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!
i said the same in another video haha
Thank you!
You're welcome!
Please make some schematics and go through the concepts a little quicker
thanks a lot
How can we do this with drf?
Sure, I cant give you a timeframe for this though at the moment
You are awesome!
Celery 5 is not working on Windows! is there an alternative ?
Use Docker containers 👍
@@veryacademy good idea, thanks
great!
please note : run the rabbit server outside the vir env
Thanks u!
Thanks You!
Windows installation guide, please
Noted Daniel. I would be recommending Docker though and not install on your machine (which can be a pain to do)
Waiting for chat app 🙄☺️
We can just chat here if you like? 😁
@@veryacademy 😀
It's so difficult
what's ur age ?
40+
@@veryacademy Oh
what is ubuntu? how to install? stuck
in settings if u use reddis add:
CELERY_BROKER_URL = "redis://localhost:6379/0"
other wise ERRR 61