Celery and transaction.atomic

后端 未结 3 1156
庸人自扰
庸人自扰 2021-02-04 04:39

In some Django views, I used a pattern like this to save changes to a model, and then to do some asynchronous updating (such as generating images, further altering the model) ba

3条回答
  •  闹比i
    闹比i (楼主)
    2021-02-04 05:18

    There are some race conditions in Celery tasks. I think here is an explanation of your problem.

    Take a look into those docs. Also there are some packages like django-celery-transactions that can help you with your question.

提交回复
热议问题