Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
E
erp5_workflow
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wenjie.zheng
erp5_workflow
Commits
2f881b06
Commit
2f881b06
authored
Oct 17, 2011
by
Julien Muchembled
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Sync ZODB patch with NEO
parent
9cd33ca4
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
6 deletions
+11
-6
product/ERP5Type/patches/ZODBConnection.py
product/ERP5Type/patches/ZODBConnection.py
+11
-6
No files found.
product/ERP5Type/patches/ZODBConnection.py
View file @
2f881b06
...
...
@@ -43,6 +43,12 @@ if 1: # keep indentation. Also good for quick disabling.
# See also neo/client/__init__.py from NEOPPOD project
if
FORCE_STORAGE_SYNC_ON_CONNECTION_OPENING
:
try
:
if
Connection
.
_nexedi_fix
!=
4
:
raise
Exception
(
"A different ZODB fix is already applied"
)
except
AttributeError
:
Connection
.
_nexedi_fix
=
4
# Whenever an connection is opened (and there's usually an existing one
# in DB pool that can be reused) whereas the transaction is already
# started, we must make sure that proper storage setup is done by
...
...
@@ -50,6 +56,8 @@ if 1: # keep indentation. Also good for quick disabling.
# For example, there's no open transaction when a ZPublisher/Publish
# transaction begins.
import
thread
def
open
(
self
,
*
args
,
**
kw
):
def
_flush_invalidations
():
acquire
=
self
.
_db
.
_a
...
...
@@ -68,9 +76,6 @@ if 1: # keep indentation. Also good for quick disabling.
Connection_open
(
self
,
*
args
,
**
kw
)
finally
:
del
self
.
_flush_invalidations
try
:
Connection_open
=
Connection
.
_setDB
Connection
.
_setDB
=
open
except
AttributeError
:
# recent ZODB
Connection_open
=
Connection
.
open
Connection
.
open
=
open
Connection_open
=
Connection
.
open
Connection
.
open
=
open
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment