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
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
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Nikola Balog
erp5
Commits
453cdf79
Commit
453cdf79
authored
Nov 30, 2023
by
Kazuhiko Shiozaki
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fixup! ERP5Site: add erp5_sql_isolated_connection.
parent
74d4341e
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
8 deletions
+5
-8
product/ERP5/ERP5Site.py
product/ERP5/ERP5Site.py
+5
-8
No files found.
product/ERP5/ERP5Site.py
View file @
453cdf79
...
...
@@ -85,7 +85,6 @@ def manage_addERP5Site(self,
validate_email
=
0
,
erp5_catalog_storage
=
'erp5_mysql_innodb_catalog'
,
erp5_sql_connection_string
=
default_sql_connection_string
,
erp5_sql_read_committed_connection_string
=
default_sql_connection_string
,
cmf_activity_sql_connection_string
=
default_sql_connection_string
,
bt5_repository_url
=
''
,
bt5
=
''
,
...
...
@@ -105,7 +104,6 @@ def manage_addERP5Site(self,
create_userfolder
,
erp5_catalog_storage
,
erp5_sql_connection_string
,
erp5_sql_read_committed_connection_string
,
cmf_activity_sql_connection_string
,
bt5_repository_url
,
bt5
,
...
...
@@ -2117,7 +2115,6 @@ class ERP5Generator(PortalGenerator):
create_userfolder
,
erp5_catalog_storage
,
erp5_sql_connection_string
,
erp5_sql_read_committed_connection_string
,
cmf_activity_sql_connection_string
,
bt5_repository_url
,
bt5
,
...
...
@@ -2142,13 +2139,11 @@ class ERP5Generator(PortalGenerator):
# Return the fully wrapped object.
p
=
parent
.
this
().
_getOb
(
id
)
erp5_sql_deferred_connection_string
=
erp5_sql_
read_committed_
connection_string
erp5_sql_deferred_connection_string
=
erp5_sql_connection_string
p
.
_setProperty
(
'erp5_catalog_storage'
,
erp5_catalog_storage
,
'string'
)
p
.
_setProperty
(
'erp5_sql_connection_string'
,
erp5_sql_connection_string
,
'string'
)
p
.
_setProperty
(
'erp5_sql_read_committed_connection_string'
,
erp5_sql_read_committed_connection_string
,
'string'
)
p
.
_setProperty
(
'erp5_sql_deferred_connection_string'
,
erp5_sql_deferred_connection_string
,
'string'
)
p
.
_setProperty
(
'cmf_activity_sql_connection_string'
,
...
...
@@ -2298,6 +2293,8 @@ class ERP5Generator(PortalGenerator):
# minus prepended to the connection string.
if
id
==
'erp5_sql_transactionless_connection'
:
connection_string
=
re
.
sub
(
r'((?:[%*][^ ]+ )*)(![^ ]+ )?(.+)'
,
r'\1-\3'
,
p
.
cmf_activity_sql_connection_string
)
elif
id
==
'erp5_sql_read_committed_connection'
:
connection_string
=
re
.
sub
(
r'((?:[%*][^ ]+ )*)(![^ ]+ )?(.+)'
,
r'\1!READ-COMMITTED \3'
,
p
.
erp5_sql_connection_string
)
else
:
connection_string
=
getattr
(
p
,
id
+
'_string'
)
manage_add
(
id
,
title
,
connection_string
,
**
kw
)
...
...
@@ -2611,8 +2608,8 @@ def initialize(self):
from
Products.ZMySQLDA.db
import
DB
,
OperationalError
def
addERP5Site
(
REQUEST
):
default_kw
=
inspect
.
getcallargs
(
manage_addERP5Site
,
None
,
''
)
db
=
(
kw
.
get
(
'erp5_sql_
read_committed_
connection_string'
)
or
default_kw
[
'erp5_sql_
read_committed_
connection_string'
])
db
=
(
kw
.
get
(
'erp5_sql_connection_string'
)
or
default_kw
[
'erp5_sql_connection_string'
])
# The lock is to avoid that multiple zopes try to create a site when
# they're started at the same time, because this is a quite long operation
# (-> high probably of conflict with a lot of wasted CPU).
...
...
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