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
Laurent S
erp5
Commits
232ac37a
Commit
232ac37a
authored
May 05, 2011
by
Łukasz Nowak
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Avoid duplication in TIDStorage configuration.
parent
d2d468bf
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
3 deletions
+3
-3
slapos/recipe/erp5/src/slapos/recipe/erp5/__init__.py
slapos/recipe/erp5/src/slapos/recipe/erp5/__init__.py
+3
-3
No files found.
slapos/recipe/erp5/src/slapos/recipe/erp5/__init__.py
View file @
232ac37a
...
...
@@ -558,12 +558,13 @@ class Recipe(BaseSlapRecipe):
backup_base_path
=
self
.
createBackupDirectory
(
'zodb'
)
# it is time to fill known_tid_storage_identifier_dict with backup
# destination
formatted_storage_dict
=
dict
()
for
k
,
v
in
known_tid_storage_identifier_dict
.
copy
().
iteritems
():
# generate unique name for each backup
name
=
'_'
.
join
([
'_'
.
join
([
str
(
q
)
for
q
in
k
[
0
][
0
]]),
k
[
1
]])
destination
=
os
.
path
.
join
(
backup_base_path
,
name
)
self
.
_createDirectory
(
destination
)
known_tid_storage_identifier
_dict
[
str
(
k
)]
=
(
v
[
0
],
destination
,
v
[
1
])
formatted_storage
_dict
[
str
(
k
)]
=
(
v
[
0
],
destination
,
v
[
1
])
logfile
=
os
.
path
.
join
(
self
.
log_directory
,
'tidstorage.log'
)
pidfile
=
os
.
path
.
join
(
self
.
run_directory
,
'tidstorage.pid'
)
statusfile
=
os
.
path
.
join
(
self
.
log_directory
,
'tidstorage.tid'
)
...
...
@@ -573,8 +574,7 @@ class Recipe(BaseSlapRecipe):
tidstorage_config
=
self
.
createConfigurationFile
(
'tidstorage.py'
,
self
.
substituteTemplate
(
self
.
getTemplateFilename
(
'tidstorage.py.in'
),
dict
(
known_tid_storage_identifier_dict
=
pprint
.
pformat
(
known_tid_storage_identifier_dict
),
known_tid_storage_identifier_dict
=
pprint
.
pformat
(
formatted_storage_dict
),
base_url
=
'%s/%%s/serialize'
%
access_url
,
host
=
ip
,
port
=
port
,
...
...
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