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

preview_player
Показать описание
Welcome to the Learn Django - Celery Series. This tutorial stream is dedicated to exploring the use of celery within Django. We start by assuming you might be new to celery and development in general and hope that by the end of this tutorial you would have deployed Celery and a message broker with a Django application.

Commands Used
################
# Install celery
pip install celery
# Install RabbitMQ (Ubuntu Linux 20.04LTS)
sudo apt-get install rabbitmq-server
# Run Celery
celery -A NAMEOFINSTANCE worker --loglevel=info
we used
celery -A proj worker --loglevel=info
(If on Windows) celery -A proj worker -l info --pool=solo
#Run Task

00:00 Introduction
06:55 Install/Start Django in Linux Ubuntu (For new users)
09:28 Pip install celery
09:39 apt-get install rabbitmq-server
11:22 Build new celery instance
14:04 Create new task
15:27 Start Celery instance
17:26 Run task with Celery

Code Repository

Like all tutorials here, please use the timeline in the description to skip ahead to different section of this tutorial. I start this series by providing context, what, why and indeed where you might use this technology within your projects. We then install C and R on a Linux environment – please let me know if you would like a Windows Tutorial. Next, we create a Django application and integrate prepare to use the application with Celery And finally, we build some very simple task for Celery to execute. This tutorial will serve as a baseline build for future tutorials in this series

SUBSCRIBE to get more free tutorials, courses and code snippets!

Follow us on Facebook

Follow use on Twitter:
Рекомендации по теме
Комментарии
Автор

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.

ShubhamSharma-ymdb
Автор

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

marioestrada
Автор

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

louishargreaves
Автор

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

subhendupanda
Автор

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

rakeshkumarbhol
Автор

Thank you so much, it finally worked!

Bargainsxx
Автор

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

mustafaalbaghdadi
Автор

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

fadyghalayiny
Автор

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

reapergrim
Автор

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)
look whether you need to change IP6 to IP4, if so you need to $ sudo nano and uncomment NODE_IP_ADDRESS=127.0.0.1 in that config.

zakchips
Автор

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.

MrValVet
Автор

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?

down__lo
Автор

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 45cc-aaec-ad0b10be8719] received doesn't display the value 8, why? Thank you!

thinho
Автор

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

vladimirgorea
Автор

14:04 import celery could not be resolved

Kennerdoll
Автор

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

VIVEKTIWARI-ocjn
Автор

this guy sounds almost like @thenetninja 👍😍

codewithfarhad
Автор

Unit rabitmq-server.service could not be found.

I have similar error with redis. Why this happen? Please help if someone knows.

emilseyfullayev
Автор

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

shawndabi
Автор

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?

Punderland
visit shbcf.ru