Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Setting CELERY_ALWAYS_EAGER=True leads to TransactionManagementError #4

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

smlz
Copy link

@smlz smlz commented Aug 23, 2012

Auto-commit synchronously executed tasks when CELERY_ALWAYS_EAGER is set to True.

When CELERY_ALWAYS_EAGER is set, tasks are executed synchronously in the same VM. Writing to the database in a such a djcelery_transactions.task, will then raise a TransactionManagementError, as the modifications are not automatically commited to the database.

[...]
  File "/home/marco/workspace/atizo-platform-env-python2.6/src/django/django/db/backends/__init__.py", line 115, in leave_transaction_management
    raise TransactionManagementError("Transaction managed block ended with "

TransactionManagementError: Transaction managed block ended with pending COMMIT/ROLLBACK

@ivirabyan
Copy link

Need this fix too

@zbyte64
Copy link

zbyte64 commented Dec 12, 2012

I too have this same issue.

@izquierdo
Copy link

Me too.

@nyaruka
Copy link

nyaruka commented Apr 24, 2013

Me three.. kind of a requirement when doing automated tests using ALWAYS_EAGER

@funkaoshi
Copy link

Same. Is this a dead project?

@tomplayford
Copy link

We've been having trouble applying this patch to latest HEAD, so I thought I'd share.

The below works for us - but use at your own risk.

https://github.com/10to8/django-celery-transactions

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants