Celery 2.0 Documentation
expensive. Database transactions Let’s look at another example: from django.db import transaction @transaction.commit_on_success def create_article(request): article = Article.objects.create(....) expand_abbreviations which will commit the transaction when the view returns, or roll back if the view raises an exception. There is a race condition if the task starts executing before the transaction has been committed: the from the current transaction: @transaction.commit_manually def create_article(request): try: article = Article.objects.create(...) except: transaction.rollback() raise else: transaction.commit() expand_abbreviations0 码力 | 165 页 | 492.43 KB | 1 年前3Celery 2.0 Documentation
expensive. Database transactions Let’s look at another example: from django.db import transaction @transaction.commit_on_success def create_article(request): article = Article.objects.create(... which will commit the transaction when the view returns, or roll back if the view raises an exception. There is a race condition if the task starts executing before the transaction has been committed: the state from the current transaction: @transaction.commit_manually def create_article(request): try: article = Article.objects.create(...) except: transaction.rollback() raise0 码力 | 284 页 | 332.71 KB | 1 年前3Celery 1.0 Documentation
following to your my.cnf: [mysqld] transaction-isolation = READ-COMMITTED For more information about InnoDBs transaction model see MySQL - The InnoDB Transaction Model and Locking [http://dev.mysql.com/doc/refman/5 com/doc/refman/5.1/en/innodb-transaction- model.html] in the MySQL user manual. (Thanks to Honza Kral and Anton Tsigularov for this solution) celeryd is not doing anything, just hanging Answer: See used to retry tasks, notably for expected errors that is catchable with the try: block. The AMQP transaction is not used for these errors: if the task raises an exception it is still acked!. The acks_late0 码力 | 221 页 | 283.64 KB | 1 年前3Celery 2.3 Documentation
uses a default transaction isolation level that is not suitable for polling tables for changes. In MySQL the default transaction isolation level is REPEATABLE-READ, which means the transaction will not see see changes by other transactions until the transaction is committed. It is recommended that you change to the READ-COMMITTED isolation level. Built-in States PENDING Task is waiting for execution or expensive. Database transactions Let’s have a look at another example: from django.db import transaction @transaction.commit_on_success def create_article(request): article = Article.objects.create(....) expand_abbreviations0 码力 | 334 页 | 1.25 MB | 1 年前3Celery 2.2 Documentation
uses a default transaction isolation level that is not suitable for polling tables for changes. In MySQL the default transaction isolation level is REPEATABLE-READ, which means the transaction will not see see changes by other transactions until the transaction is commited. It is recommended that you change to the READ-COMMITTED isolation level. Built-in States PENDING Task is waiting for execution or expensive. Database transactions Let’s have a look at another example: from django.db import transaction @transaction.commit_on_success def create_article(request): article = Article.objects.create(....) expand_abbreviations0 码力 | 314 页 | 1.26 MB | 1 年前3Celery 2.2 Documentation
uses a default transaction isolation level that is not suitable for polling tables for changes. In MySQL the default transaction isolation level is REPEATABLE-READ, which means the transaction will not see see changes by other transactions until the transaction is commited. It is recommended that you change to the READ- COMMITTED isolation level. Built-in States PENDING Task is waiting for execution or expensive. Database transactions Let’s have a look at another example: from django.db import transaction @transaction.commit_on_success def create_article(request): article = Article.objects.create(...0 码力 | 505 页 | 878.66 KB | 1 年前3Celery 2.3 Documentation
uses a default transaction isolation level that is not suitable for polling tables for changes. In MySQL the default transaction isolation level is REPEATABLE-READ, which means the transaction will not see see changes by other transactions until the transaction is committed. It is recommended that you change to the READ- COMMITTED isolation level. Built-in States PENDING Task is waiting for execution or expensive. Database transactions Let’s have a look at another example: from django.db import transaction @transaction.commit_on_success def create_article(request): article = Article.objects.create(...0 码力 | 530 页 | 900.64 KB | 1 年前3Celery v4.0.1 Documentation
use a default transaction isolation level that isn’t suitable for polling tables for changes. In MySQL the default transaction isolation level is REPEATABLE-READ: meaning the transaction won’t see changes changes made by other transactions until the current transaction is committed. Changing that to the READ-COMMITTED isolation level is recommended. Built-in States PENDING Task is waiting for execution expensive. Database transactions Let’s have a look at another example: from django.db import transaction @transaction.commit_on_success def create_article(request): article = Article.objects.create()0 码力 | 1040 页 | 1.37 MB | 1 年前3Celery v4.0.2 Documentation
use a default transaction isolation level that isn’t suitable for polling tables for changes. In MySQL the default transaction isolation level is REPEATABLE-READ: meaning the transaction won’t see changes changes made by other transactions until the current transaction is committed. Changing that to the READ-COMMITTED isolation level is recommended. Built-in States PENDING Task is waiting for execution expensive. Database transactions Let’s have a look at another example: from django.db import transaction @transaction.commit_on_success def create_article(request): article = Article.objects.create()0 码力 | 1042 页 | 1.37 MB | 1 年前3Celery 4.0 Documentation
use a default transaction isolation level that isn’t suitable for polling tables for changes. In MySQL the default transaction isolation level is REPEATABLE-READ: meaning the transaction won’t see changes changes made by other transactions until the current transaction is committed. Changing that to the READ-COMMITTED isolation level is recommended. Built-in States PENDING Task is waiting for execution expensive. Database transactions Let’s have a look at another example: from django.db import transaction @transaction.commit_on_success def create_article(request): article = Article.objects.create()0 码力 | 1042 页 | 1.37 MB | 1 年前3
共 51 条
- 1
- 2
- 3
- 4
- 5
- 6