Sending Emails in Django With Celery

Поделиться
HTML-код
  • Опубликовано: 9 фев 2025

Комментарии • 104

  • @prettyprinted
    @prettyprinted  5 лет назад +1

    Join my free course on working with the database and models in Django: prettyprinted.com/djangodata

  • @soniaspirling3131
    @soniaspirling3131 4 года назад +4

    This is one of the best sites on django and coding in general. You are crystal clear and you explain everything at a great pace. Thank you for being so helpful to so many!!

  • @danteanditzel
    @danteanditzel 4 года назад +8

    This was really helpful, I appreciate that you showed the errors that we could encounter when setting up redis and celery on a django app and guided us in solving the issues. Thank you!

  • @rdx86
    @rdx86 5 лет назад +2

    Great tutorial! That spam email from the dating site was just hilarious! They must have some powerful email scrapers running somewhere.

  • @yahyakhan-rr9ei
    @yahyakhan-rr9ei 2 года назад

    One of the best video on this topic

  • @pratikdjango8208
    @pratikdjango8208 3 года назад

    Thanks Anthony !! Well explained Mate

  • @delllatitude299
    @delllatitude299 5 лет назад +4

    Finally , Django with something unique and one level up

  • @MohammedAbuObaid
    @MohammedAbuObaid 4 года назад

    Nice one Anthony!
    Really good video to get started with Celery in Django
    Thanks

  • @hoseaochieng5355
    @hoseaochieng5355 4 года назад +1

    This video helped me alot. Thumbs up!

  • @IlanHarel
    @IlanHarel 4 года назад

    Thank you for sharing the failures and problem resolution walkthrough.

  • @andrewminhnguyen9446
    @andrewminhnguyen9446 5 лет назад

    Thanks for this video! Took me a while to find an up-to-date Django/Celery/Heroku tutorial, and I got lucky with yours!

  • @juanjosemartinromero714
    @juanjosemartinromero714 4 года назад

    Great! Thank you very much. Including those usual mistakes we make that allow you to learn deeply

  • @sumanbanik3339
    @sumanbanik3339 4 года назад +4

    Have been following you since months now, your videos are really helpful, could you make a video for integrating zoom/whereby in Django, I did that once using REST, was quite a task.
    I'm sure you can show some tricks.

  • @TheJonhjonhz
    @TheJonhjonhz Год назад

    Nice video man 🎉

  • @katekatics
    @katekatics Год назад

    Very helpful! Thanks a lot 🙏

  • @anoopkg8681
    @anoopkg8681 4 года назад +1

    For windows users, run celery as follows, celery -A projectname worker --pool=solo -l info
    , if you feel difficult adding redis , try RabbitMQ, download and install Erlang, RabbitmQ and add CELERY_BROKER_URL = 'amqp://localhost'
    in settings.py

  • @codewithfongoh
    @codewithfongoh 3 года назад

    Thank you for this. Great tutorial.

  • @talanky
    @talanky 3 года назад

    Really helpful thanks!

  • @pitupipitu
    @pitupipitu 3 года назад

    Thank you, very clear explanation and to the point!

  • @cassiosalvador7961
    @cassiosalvador7961 4 года назад

    Another extremely helpful video, thank you!

  • @pestefo
    @pestefo 3 года назад +2

    Hi, everything goes smooth until 13:00 when celery sever is run, I got this:
    consumer: Cannot connect to REDIS_URL: Error while reading from socket: (54, 'Connection reset by peer').. any hints where the error could be?

    • @byiringirooscar321
      @byiringirooscar321 2 года назад +1

      I had the same issues I don't know how we can fix this issues if you have found the fix please let me know

  • @sohaibshafiq3962
    @sohaibshafiq3962 3 года назад +4

    Heroku Redis is not working for me. I got error saying, "Cannot connect to amqp://guest:**@127.0.0.1:5672//: [Errno 111] Connection refused."

    • @Arturcru
      @Arturcru 2 года назад

      Did anyone fixed this?

    • @sigmoid1320
      @sigmoid1320 2 года назад +1

      @@Arturcru At this time, you're probably not going to see Heroku Redis as part of the add-ons (you'll likely see Heroku Data for Redis). In my case, I just used another redis add-on. Try using RedisGreen.

    • @Arturcru
      @Arturcru 2 года назад +1

      @@sigmoid1320 thank you i did it somehow but i will remember this in future :)

  • @NiM44
    @NiM44 4 года назад

    Simple and really useful , thanks mate

  • @leandrocosta4283
    @leandrocosta4283 5 лет назад +1

    Hello Anthony, I just got to know your channel and I'm loving the videos. do an example of crud with Svelte using Django rest I believe would be a success!

  • @alekseykonotop1745
    @alekseykonotop1745 5 лет назад

    Thanks a lot for this guide! Liked and Subscribed!

  • @deus9246
    @deus9246 3 года назад +4

    This was really helpful! Just one question how would this process of starting/restating the celery server be handled in the production environment?

  • @nehat786
    @nehat786 5 лет назад

    Amazing video after long time.

  • @sickdarth
    @sickdarth 4 года назад

    Amazing video, thanks a lot!

  • @chandanurs7554
    @chandanurs7554 5 лет назад

    Thanks Anthony. I am glad that i found this video. Liked and Subscribed :-)

  • @martinv1123
    @martinv1123 5 лет назад

    Useful as always!

  • @99phenomenon
    @99phenomenon 2 года назад +1

    full --heroku!

  • @ConsuelaSpongey798
    @ConsuelaSpongey798 5 лет назад

    Awesome vid man!

  • @md.akib5124
    @md.akib5124 5 лет назад

    awesome as always

  • @samuelfelipecastrofernande3087
    @samuelfelipecastrofernande3087 2 года назад

    Thank you very much!!

  • @danielkamau8436
    @danielkamau8436 4 года назад

    good work there

  • @yajantbhawsar2481
    @yajantbhawsar2481 5 лет назад +10

    Hello Anthony, could you please make a video on,
    "Integrating Google calendar" in python Django, and creating the events on it. Their are not much resources or tutorials available for it. We will be so glad to have one from you. Thanks in advance.

    • @prettyprinted
      @prettyprinted  5 лет назад +4

      That's a good idea. I'll look into it.

  • @tomneeld
    @tomneeld 5 лет назад

    Nice intro. Thanks, really helped

  • @wesleybarnes5376
    @wesleybarnes5376 4 года назад

    New to this environment, so is Celery the go to for Django to do all my backend tasks and scripts basically, for example: *Running daily reports on sales, *tasks that request user reviews via automated emails, etc? Thanks for the video

  • @sanyammittal2943
    @sanyammittal2943 4 года назад +1

    [2020-07-16 23:52:45,251: ERROR/MainProcess] consumer: Cannot connect to amqp://guest:**@127.0.0.1:5672//: [Errno 111] Connection refused.
    Trying again in 8.00 seconds... (4/100)
    getting this error whenever I run Celery server
    Please Help

    • @yokeshm5175
      @yokeshm5175 4 года назад +1

      In settings.py, instead of CELERY_BROKER_URL try using BROKER_URL

  • @privetabdul
    @privetabdul 4 года назад

    thank you!

  • @hamedmatari2577
    @hamedmatari2577 Год назад

    now I can say, I understood celery

  • @pravegshrestha2610
    @pravegshrestha2610 4 года назад

    Hi there, Here, we manually run the celery worker on the command line, but when we deploy our app on the server, then how can we run the celery worker for those tasks?

  •  4 года назад +1

    Thank you very much!
    This took me a while I was like but I even install Linux in a partition of my drive because new celery doesn't have support for windows.
    Regards!

  • @phandinh1241
    @phandinh1241 5 лет назад +1

    Thank for your sharing, do you know how to run a Celery worker on Google cloud?

  • @oops5595
    @oops5595 5 лет назад +1

    Hey man, nice video but can you schedule the celery to run on particular time))) and dockerizing them would be COOOOOOOOOL AND HOT )))

  • @АндрійПолухін-ю1ч
    @АндрійПолухін-ю1ч 3 года назад

    A great video on Celery in Django! Thanks, Anthony :-)

  • @kona7805
    @kona7805 4 года назад

    I have a project with a Model that already had a TimeField set. Is it possible to use Celery to send a daily email based on that TimeField? Or maybe a notification in the website?

  • @tech-talks-with-ali
    @tech-talks-with-ali 4 года назад

    Thanks for your video, do you have more complex videos like periodic tasks ?

  • @michaels8297
    @michaels8297 4 года назад

    A point of confusion I have with this is what if there are multiple users using your website and they all are using the route with this task queue. Does each persons task get run immediately on their browser or does the task wait in the queue until its turn to execute

  • @solo8003
    @solo8003 5 лет назад

    Nice work, we are waiting for more like this...Thank you

  • @MrYoklmn
    @MrYoklmn 5 лет назад +1

    Finally! Finally! Thank you!

  • @rangabharath4253
    @rangabharath4253 5 лет назад

    Awesome anthony. Could you please make a tutorial on order management system using django making use of flipkart,snapdeal,amazon seller apis. Thank you so much for the awesome tutorials.

  • @vazcaino
    @vazcaino 3 года назад

    Hello my friends. Great video tutorial. I have a problem here. When I have to send 1 e-mail per request it works perfectly, but if you have 5 e-mails, for example, there is a connection error with SMTP. I believe that this error is due to the competition between tasks, that is, it is trying to send everything at the same time. Is there anything that can solve this?

  • @RealEngineer
    @RealEngineer 5 лет назад

    Great Channel!

  • @michaels8297
    @michaels8297 4 года назад

    Hello, could anyone explain why celery is useful over threading? On my flask app I have the user set some sensor ranges for a few different sensor values. Tried using a while loop and realized I couldnt return data to the client side since the while loop was infinite and I have since found myself looking up celery and threading. Would setting up some threads (with different variable names for each thread) be better than celery for this case?

  • @hemanthvatti4387
    @hemanthvatti4387 4 года назад

    very nice..........

  • @samarthgodase1011
    @samarthgodase1011 4 года назад

    can i schedule emails with celery to send at particular time

  • @amitborkar2892
    @amitborkar2892 5 лет назад

    Bro should i use Django in backend for my desktop electron js application?

  • @ojasio
    @ojasio 4 года назад

    Sweeet :). Thanku so much.

  • @lakshaynz
    @lakshaynz 4 года назад

    wowowowow hold up right there - how did you get a virtual environment so oquickly???????

  • @pratikt007
    @pratikt007 4 года назад +1

    When i create huroku redis free so It will ask credit card information

  • @Vickersyt
    @Vickersyt 5 лет назад +5

    Hi Anthony, thanks for vid! Could you please do a tutorial on celery beat with django? For example some simple periodic web scraping with saving to db

    • @nehat786
      @nehat786 5 лет назад +1

      This would be great brother. We need more django videos like this

    • @prettyprinted
      @prettyprinted  5 лет назад +3

      I'll look into Celery Beat.

    • @Vickersyt
      @Vickersyt 5 лет назад +1

      @@prettyprinted Thats great thank you so much Sir!

  • @prota275
    @prota275 3 года назад

    why do you use pipenv instead of regular venv btw?

  • @Furyki
    @Furyki 4 года назад

    redis broker is working and the task is being executed but not succeeding, though it keeps on receiving the task that it needs to execute, im using the vscode terminal and im running on windows, should i use the linux terminal in order for this to work properly ? , if you can help me then tnx in advance ur tutorial is still very helpful.

  • @susamamaity1257
    @susamamaity1257 4 года назад

    :even though I installed redis still it is showing:ImportError: Missing redis library (pip install redis).
    Please help me out. I am stuck with this.

  • @arielmontes6404
    @arielmontes6404 4 года назад +1

    I'm geting an error when using delay() from Models. => 'NoneType' object has no attribute 'delay'

    • @arielmontes6404
      @arielmontes6404 4 года назад

      I was looking for information. Celery does not appear to guarantee compatibility with Windows in asynchronous operations.

    • @arielmontes6404
      @arielmontes6404 4 года назад

      FIXED!
      In the file CELERY.PY
      ...
      os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'main.settings')
      os.environ.setdefault('FORKED_BY_MULTIPROCESSING', '1')

  • @sainco3036
    @sainco3036 5 лет назад

    Thanks.

  • @deepanshuaggarwal7042
    @deepanshuaggarwal7042 4 года назад

    is it necessary to use HEROKU ?

  • @amansingh-os9gd
    @amansingh-os9gd 4 года назад

    Hey can you please help me with an issue relating to above ? Really like your videos btw

  • @MrTuzzo77
    @MrTuzzo77 5 лет назад +1

    Hi, thanks for your beautiful channel. Your videos very very helpful. Can you make a video about multi thread application in Python Django? Thanks

  • @TemirlanNurmamatov
    @TemirlanNurmamatov 5 лет назад

    Hi, I really like your videos!
    Can you please make a video on Dynamic Django Formsets? I have searched the internet for a few days, and most of the solutions are out of date (5-8 years old). I think a lot of people would be interested

  • @nurkanatkhametov6225
    @nurkanatkhametov6225 4 года назад

    Is there is issue with sending email from instance of celery on Windows? Why are you using ubuntu terminal for running celery?

    • @shamsow
      @shamsow 4 года назад

      According to the Celery docs, Windows is not supported.

    • @unkownknown7156
      @unkownknown7156 4 года назад

      @@shamsow so what can be used if not celery

  • @igorkomarov6607
    @igorkomarov6607 5 лет назад

    Perfect

  • @clintonmoshe9544
    @clintonmoshe9544 5 лет назад

    goog content, keep it up

  • @thezquad
    @thezquad 5 лет назад

    Hey Antony Can you do a tutorial on celery beat with django? Maybe even the same send email task.

  • @MiaElliottPhotos
    @MiaElliottPhotos 5 лет назад

    Im building an app in which user has to provide some data and in return he/she will get an email with an attachment that contains provided data. I am expecting large traffic on my website. Would Celery make any sense in this situation?

    • @prettyprinted
      @prettyprinted  5 лет назад

      Yeah, you can use Celery to handle sending the email.

    • @unkownknown7156
      @unkownknown7156 4 года назад

      Hello did you done your project as you mentioned above @Mia Elliott

    • @MiaElliottPhotos
      @MiaElliottPhotos 4 года назад

      Project was canceled and as far as I remember Celery wasn't the way to go

  • @JaratMan
    @JaratMan 3 года назад

    Рахмат

  • @tz607
    @tz607 5 лет назад

    How to setup celery with nginx and gunicorn !??

  • @sohaibshafiq3962
    @sohaibshafiq3962 3 года назад

    My Django application is running locally.

  • @abe9993
    @abe9993 4 года назад

    Not usefull for me because I don't want to use my credit card information for Heroku

    • @enes222
      @enes222 3 года назад

      Is it wants?

    • @SmoothBeatbox
      @SmoothBeatbox 3 года назад

      @@enes222 yes

    • @SmoothBeatbox
      @SmoothBeatbox 3 года назад

      CELERY_BROKER_URL = "redis://redis:6379"
      CELERY_RESULT_BACKEND = "redis://redis:6379"
      #add this to settings