Asynchronous Tasks in Python - Getting Started With Celery

  Рет қаралды 149,428

Pretty Printed

Pretty Printed

Күн бұрын

Пікірлер: 92
@chikwang241
@chikwang241 4 жыл бұрын
"Straightforward" is what the world needs. Thank you.
@REBUTTELER
@REBUTTELER 2 жыл бұрын
This is a beautiful tutorial. I've bought a Udemy course specifically for Celery and read multiple pieces of documentation and they were laced with needless information. This summarizes the bare essentials that I really needed to know. Thank you!
@stephanschlogl8592
@stephanschlogl8592 4 жыл бұрын
Thanks for this video. As always very helpful. An in depth example using celery within django or flask and also covering how to configure different workers and queues for various tasks would be great!
@ChrisHalden007
@ChrisHalden007 4 жыл бұрын
That was quite a timing. Needed an overview of Celery right now ;) Great video. Thanks!
@gopesh97
@gopesh97 Жыл бұрын
Finally a celery video that makes so much sense!! Thank you!!
@salimkachemela
@salimkachemela 4 жыл бұрын
Great explanation. It would of much awesome if you could explain it with a more concrete example with, say may be a django project, may be sending and receiving data to/from an external API. That's the part that trips people a lot.
@ConsuelaPlaysRS
@ConsuelaPlaysRS 3 жыл бұрын
+1 to this. Would also like some explanation about when to use a dedicated MQ vs database and why/how this is different from threading.
@rudeadyet1992
@rudeadyet1992 4 жыл бұрын
Thanks, Anthony. Also would like to know more about Chaining, Grouping and Chording of the tasks in Celery.
@TechWithSabri
@TechWithSabri 2 жыл бұрын
thank you so much for your time and it still works in 2022, for beginners i advice you to go with documentation of Celery and then check these videos
@ericsalesdeandrade9420
@ericsalesdeandrade9420 Жыл бұрын
Really nice video and top quality. Thanks. What screen recording software do you use? Is this on a 4K monitor?
@q44444q
@q44444q 4 жыл бұрын
Excellent overview, thank you! Would be awesome if you added a video about how to communicate progress for longer running tasks.
@JFromAcc
@JFromAcc 3 жыл бұрын
Phenomenal video. Got me up and going when I was stuck.
@stevewinters5653
@stevewinters5653 3 жыл бұрын
100% agree!!!
@SaiGollapudi
@SaiGollapudi 7 ай бұрын
Wow. simple and clear. Thanks for making and sharing the video
@PrickyToTheMoon
@PrickyToTheMoon Жыл бұрын
Thank you for this video. Exactly what I was looking for.
@yan200go
@yan200go 2 жыл бұрын
The best video about celery
@StudyStreamPlus
@StudyStreamPlus 8 ай бұрын
Thanks for this. Solid introduction.
@ejay4032
@ejay4032 Жыл бұрын
Awesome, straight forward video.
@CesarContreras13
@CesarContreras13 4 жыл бұрын
if I would want to send an email one week after some user do something, for instance, should I use Celery? great video btw
@OboriNN
@OboriNN Жыл бұрын
Thank you! Easy, clear, fast.
@sinahariri6623
@sinahariri6623 2 жыл бұрын
thank you for smooth explanaition.
@jetra_h
@jetra_h 4 жыл бұрын
your videos are good, but as newbies, we can't follow. if you could include how to set up rabbitmqp as well. And if your video is about scheduling sending post or email. would be great!
@entity5678
@entity5678 Жыл бұрын
very helpful video..thank you sir
@vitorsilva-or1dj
@vitorsilva-or1dj 5 ай бұрын
I LOVE YOU BRO!!!!! THANKS, BRAZIL HERE
@TheAremoh
@TheAremoh Жыл бұрын
Nice introduction. What's the difference between send_task and delay method?
@bashirabdelwahed40
@bashirabdelwahed40 2 жыл бұрын
straight to the point! I love this video
@DaniloSilva-pl3sq
@DaniloSilva-pl3sq 2 жыл бұрын
SUCH A GOOD EXPLANATION!!!!!!
@harshitsantosh825
@harshitsantosh825 4 жыл бұрын
A great video. It would have been better of you could shown where we can use it. The example was really straightforward.
@cynthia7000
@cynthia7000 2 жыл бұрын
Great video! One question - I always hear these terms in System Design -- put the task/job in the queue and execute later, so is it a string/function/or other things that we put in the queue?? Thanks!!👍👍👍👍👍
@rishabh.malviya
@rishabh.malviya Жыл бұрын
This was awesome!
@Ahmed-hv9bt
@Ahmed-hv9bt 3 жыл бұрын
So basically when we call .delay method on any task, celery throws that task into the task queue from where celery worker fetches the tasks to execute. In this example, queue was at cloud. If Internet stops working(for the sake of example) after calling the .delay method on task, celery worker won't be able to fetch the task and execute the task. Correct?
@SviatoslavKalina
@SviatoslavKalina 2 жыл бұрын
Thank you for good explanation.
@marcelogrsp
@marcelogrsp 3 жыл бұрын
Confusing method name “delay”! It could be “enqueue” or am I getting the wrong concept of delay method?
@SP-db6sh
@SP-db6sh Жыл бұрын
Remember this channel as Wiki-Tube !
@AshikG
@AshikG Жыл бұрын
great and simple explanation.
@maikhanhchi4479
@maikhanhchi4479 2 жыл бұрын
so touching for an excellent video
@ksradau
@ksradau 8 ай бұрын
perfect explanation! thanks a lot
@gaby1491
@gaby1491 4 жыл бұрын
this was clear and to the point. thank you!
@calvinnicxon
@calvinnicxon 4 жыл бұрын
This is great mate! I wonder how can we run the worker in the background. I've read that some documentation to run the worker as a daemon. But I still don't understand it fully.
@lfnkf
@lfnkf 4 жыл бұрын
Just got my sub. Thanks for sharing it!
@Ekosusiloharjo
@Ekosusiloharjo 4 жыл бұрын
Thank you Anthony, can you make tutorial for howto manage queuing in post message
@jpgarcia90
@jpgarcia90 3 жыл бұрын
Hi Anthony, thanks for the video. Would you still recommend to use Celery or go for Flask 2.0 async capabilities?
@jeffz7310
@jeffz7310 11 ай бұрын
Beautiful printed
@MrGarg10may
@MrGarg10may 3 жыл бұрын
Very nice explanation
@kilbeam99
@kilbeam99 3 жыл бұрын
I have a website running on Flask that calculates travel times between appointments in Google Calendar. The calculation of these travel times can take up to 1 minute, so I want to push it to the background with celery. Your video has really helped me grasped the basics, but I have a few questions. The process won't return anything, other than say "it's done". In other words, when a user starts the calculation, I want them to be redirected to a "waiting" page, and be redirected again to a "success" page when it is done. How can I have Flask redirect a user from the waiting page to the success page as soon as the process is done? Do I need to have Flash check the status of the process every few seconds?
@kvedia15
@kvedia15 3 жыл бұрын
you can have use setInterval in javascript and send a request to you backend every minute to check the status of the celery worker, if its done you can redirect the user to the results page?
@Firiyuu
@Firiyuu 3 жыл бұрын
Hwo did you make celery work on windows?
@pascholatti
@pascholatti 10 ай бұрын
Great, that really helped
@zhenhuanSupport
@zhenhuanSupport 2 жыл бұрын
This is great if u can use flower together it will be more presentable
@cassiosalvador7961
@cassiosalvador7961 4 жыл бұрын
Thanks for this video, it helped me a lot!
@danswaney4134
@danswaney4134 6 ай бұрын
How do you push status_update() to take effect before returning?
@mystackquest
@mystackquest 3 жыл бұрын
Hai Anthony... Your videos are helpful for me. But I am stucked on Flask factory pattern since Celery don't have init_app method. It makes import issues. How can I solve this issue? Thanks in advance.
@TheWellington1997
@TheWellington1997 2 жыл бұрын
hello! Can you explain how to prioritize tasks with redis backend?
@deepamgupta8011
@deepamgupta8011 3 жыл бұрын
Pretty Explained
@iqbalhonnur4451
@iqbalhonnur4451 3 жыл бұрын
Why can't we use rabbitmq itself as a task queue and also as mb instead of celery?
@shatandv
@shatandv 3 жыл бұрын
Nice and clear, thanks!
@dheerajthodupunoori7431
@dheerajthodupunoori7431 3 жыл бұрын
i want to create a celery task , and inside that task i am creating two processes using multiprocessing module in python . Will that work fine?
@gautamrishi5391
@gautamrishi5391 Жыл бұрын
does celery.delay() takes time. if it does how to minimize that?
@akshatagrawal819
@akshatagrawal819 3 жыл бұрын
Amazing tutorial!
@storiesshubham4145
@storiesshubham4145 Жыл бұрын
Amazing Amazing Amazing 🎉
@prettyprinted
@prettyprinted Жыл бұрын
Thanks for watching!
@EnglishRain
@EnglishRain 3 жыл бұрын
Thank you this was excellent!!
@Furyki
@Furyki 3 жыл бұрын
Hi @Pretty Printed, can u create a tutorial how to use Redis Version 6 with Celery in python ? , tnx in advance.
@WaldoTheWombat
@WaldoTheWombat 3 жыл бұрын
Ok thanks, but when i do it in a python file then the print statement doesn't execute until the the the reverse function is finished (not happening asynchronously): from tasks import reverse reverse.delay("anthony") print("something")
@SkimFelBon
@SkimFelBon 4 жыл бұрын
great video, very helpful
@Furyki
@Furyki 4 жыл бұрын
Hi @Pretty Printed , can u create a tutorial how to use celery on django? , tnx in advance!!
@codedjango
@codedjango 4 жыл бұрын
Thank you Anthony
@now1313
@now1313 3 жыл бұрын
Thank you for the tutorial. We are testing apps which use celery and now I’m actually starting to get what was going on :(
@ganeshdabral8963
@ganeshdabral8963 3 жыл бұрын
thanks it's very helpfull
@praveeniyer4294
@praveeniyer4294 2 жыл бұрын
I have a requirement, to develop a celery based scheduling service which dynamically call a url for every 5 minute / 15 minutes/ 1 hour
@danielschmider5069
@danielschmider5069 4 жыл бұрын
you didnt actually run multiple asynchronous tasks tho, kinda missing the point this way... How does this compare to just using asyncio, which is built-in into python, doesnt require a broker, or redis and sqlite dbs and sqlalchemy?
@rblr46
@rblr46 4 жыл бұрын
Asyncio uses green threads/coroutine for concurrency, using only one thread hence once CPU. Asyncio is for I/O bounds process, that includes a lot of waiting. If we have a lot of CPU bound task that we want to do asynchronously on different processes, we can send them for a celery worker to process. Be careful not being confused with concurrency (asyncio)/parallelism (celery)
@GregWoodsLancs
@GregWoodsLancs 4 жыл бұрын
@1:01 when not using Heroku, where do I get the AMQP URL? Looking in the RabbitMq Web Management interface, I can't see any trace of it
@rutujpande4816
@rutujpande4816 3 жыл бұрын
@@GregWoodsLancs can you please share your source docs. would be helpful.
@KrishnaManohar8021
@KrishnaManohar8021 4 жыл бұрын
continue this series...
@Johnbin89
@Johnbin89 4 жыл бұрын
Can you use it on a function that takes a form object as an input? My guess is a no as i had big trouble in a django project using Django_Q, but has anyone done it with celery?
@rogueriver
@rogueriver 3 жыл бұрын
What is the difference between celery and asyncio?
@bennguyen1313
@bennguyen1313 4 жыл бұрын
As a beginner, I like all the quick tips you casually mention.. like reversing a string using text[::-1], or the use of Heroku to run python in the cloud, or sqlite3 / sqlalchemy for the database! Not sure about the decorator part, but I like how you can use import your custom function using "from tasks import reverse" How does Celery differ from import threading / TaskThread() ? How does RabbitMQ / Redis task queues, differ from python's queue? Seems alot of people use Celery with Django for web applications.. like web scraping instead of using curl?
@adityanjsg99
@adityanjsg99 Жыл бұрын
20 hrs of work condensed in to 10 mins of video
@CrashLaker
@CrashLaker 3 жыл бұрын
great thank you
@mingli9563
@mingli9563 3 жыл бұрын
Awesome
@Anshegar
@Anshegar 3 жыл бұрын
then i try to use DB , celery not writing in db , but no errors.
@IllevensKO
@IllevensKO 2 жыл бұрын
You're saying that "celery needs task queue" but the description of celery says it IS a task queue itself. I usually love all your tutorials, but this moment was very confusing.
@onesky4343
@onesky4343 2 жыл бұрын
Thanks ynohtnA
@praveeniyer4294
@praveeniyer4294 2 жыл бұрын
Can you please help me
@yuhechen7258
@yuhechen7258 4 жыл бұрын
like a breeze
@jafarOTS
@jafarOTS 3 жыл бұрын
hi, I use celery with redis on my local machine but anytime I try to run the celery worker i get the error [2021-04-21 11:09:52,283: ERROR/MainProcess] consumer: Cannot connect to redis://localhost:6379//: Error 10061 connecting to localhost:6379. No connection could be made because the target machine actively refused it, how do i resolve it please?
@DenzelHooke
@DenzelHooke 3 жыл бұрын
Change your port. Sometimes the default localhost ports aren't available and you have to go higher. 8080 usually works.
@myevar84
@myevar84 Ай бұрын
Thanks a lot. I am trying this example on Window but I'm getting tesk received, not secceed "[2024-09-10 12:26:24,835: INFO/MainProcess] Task tasks.reverse[c662f373-1f2d-434d-bf27-0019e3795b20] received". I tried "celery -A tasks worker --loglevel=DEBUG --without-gossip", but nothing changed !! Maybe can someone help me.
Python Celery Distributed Task Queue | End to End Application with Celery
20:10
FastAPI Celery, Flower and Docker
29:33
Very Academy
Рет қаралды 55 М.
Un coup venu de l’espace 😂😂😂
00:19
Nicocapone
Рет қаралды 10 МЛН
小蚂蚁会选到什么呢!#火影忍者 #佐助 #家庭
00:47
火影忍者一家
Рет қаралды 101 МЛН
Когда отец одевает ребёнка @JaySharon
00:16
История одного вокалиста
Рет қаралды 13 МЛН
An Example of Celery in a Flask App With Multiple Files
15:40
Pretty Printed
Рет қаралды 21 М.
Python Asynchronous Programming - AsyncIO & Async/Await
25:57
Tech With Tim
Рет қаралды 429 М.
25 nooby Python habits you need to ditch
9:12
mCoding
Рет қаралды 1,8 МЛН
Python dataclasses will save you HOURS, also featuring attrs
8:50
Task Queues: A Celery Story
29:39
PyCon AU
Рет қаралды 37 М.
Sending Emails in Django With Celery
23:20
Pretty Printed
Рет қаралды 78 М.
Celery for asynchronous tasks in Django
8:46
Django road
Рет қаралды 7 М.
The most important Python script I ever wrote
19:58
John Watson Rooney
Рет қаралды 202 М.
Introduction to Celery and Creating Asynchronous Tasks for Django
13:20
Un coup venu de l’espace 😂😂😂
00:19
Nicocapone
Рет қаралды 10 МЛН