Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
erp5
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Labels
Merge Requests
139
Merge Requests
139
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Jobs
Commits
Open sidebar
nexedi
erp5
Commits
828e4d5b
Commit
828e4d5b
authored
Oct 07, 2024
by
Kazuhiko Shiozaki
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fixup! ERP5Site: add erp5_sql_read_committed_connection.
parent
5fd4afd9
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
0 deletions
+4
-0
product/ERP5/ERP5Site.py
product/ERP5/ERP5Site.py
+2
-0
product/ERP5Type/tests/ERP5TypeTestCase.py
product/ERP5Type/tests/ERP5TypeTestCase.py
+2
-0
No files found.
product/ERP5/ERP5Site.py
View file @
828e4d5b
...
@@ -2282,8 +2282,10 @@ class ERP5Generator(PortalGenerator):
...
@@ -2282,8 +2282,10 @@ class ERP5Generator(PortalGenerator):
# The only difference compared to activity connection is the
# The only difference compared to activity connection is the
# minus prepended to the connection string.
# minus prepended to the connection string.
if
id
==
'erp5_sql_transactionless_connection'
:
if
id
==
'erp5_sql_transactionless_connection'
:
# omit isolation-level and add '-' sign in front of the database.
connection_string
=
re
.
sub
(
r'((?:[%*][^ ]+ )*)(![^ ]+ )?(.+)'
,
r'\1-\3'
,
p
.
cmf_activity_sql_connection_string
)
connection_string
=
re
.
sub
(
r'((?:[%*][^ ]+ )*)(![^ ]+ )?(.+)'
,
r'\1-\3'
,
p
.
cmf_activity_sql_connection_string
)
elif
id
==
'erp5_sql_read_committed_connection'
:
elif
id
==
'erp5_sql_read_committed_connection'
:
# force READ-COMMITTED isolation-level.
connection_string
=
re
.
sub
(
r'((?:[%*][^ ]+ )*)(![^ ]+ )?(.+)'
,
r'\1!READ-COMMITTED \3'
,
p
.
erp5_sql_connection_string
)
connection_string
=
re
.
sub
(
r'((?:[%*][^ ]+ )*)(![^ ]+ )?(.+)'
,
r'\1!READ-COMMITTED \3'
,
p
.
erp5_sql_connection_string
)
else
:
else
:
connection_string
=
getattr
(
p
,
id
+
'_string'
)
connection_string
=
getattr
(
p
,
id
+
'_string'
)
...
...
product/ERP5Type/tests/ERP5TypeTestCase.py
View file @
828e4d5b
...
@@ -107,12 +107,14 @@ def _getConnectionStringDict():
...
@@ -107,12 +107,14 @@ def _getConnectionStringDict():
if
connection_string
:
if
connection_string
:
connection_string_dict
[
connection
]
=
connection_string
connection_string_dict
[
connection
]
=
connection_string
connection
=
'cmf_activity_sql_connection_string'
connection
=
'cmf_activity_sql_connection_string'
# force READ-COMMITTED isolation-level.
connection_string_dict
[
connection
]
=
\
connection_string_dict
[
connection
]
=
\
os
.
environ
.
get
(
connection
,
re
.
sub
(
os
.
environ
.
get
(
connection
,
re
.
sub
(
r'((?:[%*][^ ]+ )*)(![^ ]+ )?(.+)'
,
r'\1!READ-COMMITTED \3'
,
connection_string_dict
[
'erp5_sql_connection_string'
]))
r'((?:[%*][^ ]+ )*)(![^ ]+ )?(.+)'
,
r'\1!READ-COMMITTED \3'
,
connection_string_dict
[
'erp5_sql_connection_string'
]))
# default value for transactionless is derived from value
# default value for transactionless is derived from value
# for cmf_activity, so process it last
# for cmf_activity, so process it last
connection
=
'erp5_sql_transactionless_connection_string'
connection
=
'erp5_sql_transactionless_connection_string'
# omit isolation-level and add '-' sign in front of the database.
connection_string_dict
[
connection
]
=
\
connection_string_dict
[
connection
]
=
\
os
.
environ
.
get
(
connection
,
re
.
sub
(
os
.
environ
.
get
(
connection
,
re
.
sub
(
r'((?:[%*][^ ]+ )*)(![^ ]+ )?(.+)'
,
r'\1-\3'
,
connection_string_dict
[
'cmf_activity_sql_connection_string'
]))
r'((?:[%*][^ ]+ )*)(![^ ]+ )?(.+)'
,
r'\1-\3'
,
connection_string_dict
[
'cmf_activity_sql_connection_string'
]))
...
...
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