Skip to content

Simple thread safety fix + a more reliable way to check if managed#2

Open
kylemacfarlane wants to merge 3 commits intoXof:masterfrom
kylemacfarlane:master
Open

Simple thread safety fix + a more reliable way to check if managed#2
kylemacfarlane wants to merge 3 commits intoXof:masterfrom
kylemacfarlane:master

Conversation

@kylemacfarlane
Copy link
Copy Markdown

This includes two fixes.

  1. The current SID is now thread local.

  2. More sensible behaviour if for some reason autocommit is off but this decorator is in use.

When I use this decorator I also remove the custom _leave_transaction_management. Django itself sometimes starts transactions within the ORM and this fix does not cover those occasions. Placing a fix in this decorator gives people false hope when they really need to just patch Django proper.

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.

1 participant