Django - difference between cues and celery

This may be a lame question, but I'm really confused by the two. I know that they signalsare used to perform some tasks when something happened. But what about celery? The documentation says:

Celery is a queue of an asynchronous task / task queue based on distributed messaging.

Can someone please explain to me what celery is? What is the difference between the two and when to use them? We will be very grateful! Thanks.

+4
source share
1 answer

. , , before_save SomeModel. ... ... :

def some_view(requrest):
    # do some staff
    SomeModel(some_field="Hello").save()
    # do other stuff

:

  • SomeModel(some_field="Hello").save():
    • django.
    • before_save
    • DB

python ( , ).

. (, celery_task (arg1 = "Hello" )). :

celery_task.delay(arg1="Hello") 

. python ( ). : ? ? - ?

, , , , facebook ..

+13

All Articles