M
M
Mikhail2018-08-17 18:06:48
PostgreSQL
Mikhail, 2018-08-17 18:06:48

How to implement data modification in the database in a background task?

I know it's done with celery but don't know how to use it :(
PS Django 2+

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
Sergey Tikhonov, 2018-08-20
@TheMaxai

Celery allows you to run arbitrary code in another process.

import django
django.setup() 

@app.task
def do_something():
    pass

Actually everything you need to start using celery. About the setting is well written in the documentation.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question