Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
M
moodle_rebase10.1.2
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
Dmitry Blinov
moodle_rebase10.1.2
Commits
fde76f75
Commit
fde76f75
authored
Oct 19, 2011
by
Łukasz Nowak
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Generate parts for zope log rotation.
parent
4bc4c48f
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
0 deletions
+4
-0
slapos/recipe/generate_erp5_tidstorage.py
slapos/recipe/generate_erp5_tidstorage.py
+4
-0
No files found.
slapos/recipe/generate_erp5_tidstorage.py
View file @
fde76f75
...
@@ -99,12 +99,14 @@ class Recipe(GenericSlapRecipe):
...
@@ -99,12 +99,14 @@ class Recipe(GenericSlapRecipe):
snippet_zope
=
open
(
self
.
options
[
'snippet-zope'
]).
read
()
snippet_zope
=
open
(
self
.
options
[
'snippet-zope'
]).
read
()
zope_id
=
'zope-distribution'
zope_id
=
'zope-distribution'
part_list
.
append
(
zope_id
)
part_list
.
append
(
zope_id
)
part_list
.
append
(
'logrotate-entry-%s'
%
zope_id
)
output
+=
snippet_zope
%
dict
(
zope_thread_amount
=
1
,
zope_id
=
zope_id
,
zope_port
=
current_zope_port
,
output
+=
snippet_zope
%
dict
(
zope_thread_amount
=
1
,
zope_id
=
zope_id
,
zope_port
=
current_zope_port
,
**
zope_dict
)
**
zope_dict
)
# always one admin node
# always one admin node
current_zope_port
+=
1
current_zope_port
+=
1
zope_id
=
'zope-admin'
zope_id
=
'zope-admin'
part_list
.
append
(
zope_id
)
part_list
.
append
(
zope_id
)
part_list
.
append
(
'logrotate-entry-%s'
%
zope_id
)
output
+=
snippet_zope
%
dict
(
zope_thread_amount
=
1
,
zope_id
=
zope_id
,
zope_port
=
current_zope_port
,
output
+=
snippet_zope
%
dict
(
zope_thread_amount
=
1
,
zope_id
=
zope_id
,
zope_port
=
current_zope_port
,
**
zope_dict
)
**
zope_dict
)
# handle activity key
# handle activity key
...
@@ -112,6 +114,7 @@ class Recipe(GenericSlapRecipe):
...
@@ -112,6 +114,7 @@ class Recipe(GenericSlapRecipe):
current_zope_port
+=
1
current_zope_port
+=
1
part_name
=
'zope-activity-%s'
%
q
part_name
=
'zope-activity-%s'
%
q
part_list
.
append
(
part_name
)
part_list
.
append
(
part_name
)
part_list
.
append
(
'logrotate-entry-%s'
%
part_name
)
output
+=
snippet_zope
%
dict
(
zope_thread_amount
=
1
,
zope_id
=
part_name
,
zope_port
=
current_zope_port
,
output
+=
snippet_zope
%
dict
(
zope_thread_amount
=
1
,
zope_id
=
part_name
,
zope_port
=
current_zope_port
,
**
zope_dict
)
**
zope_dict
)
# handle backend key
# handle backend key
...
@@ -123,6 +126,7 @@ class Recipe(GenericSlapRecipe):
...
@@ -123,6 +126,7 @@ class Recipe(GenericSlapRecipe):
current_zope_port
+=
1
current_zope_port
+=
1
part_name
=
'zope-%s-%s'
%
(
backend_name
,
q
)
part_name
=
'zope-%s-%s'
%
(
backend_name
,
q
)
part_list
.
append
(
part_name
)
part_list
.
append
(
part_name
)
part_list
.
append
(
'logrotate-entry-%s'
%
part_name
)
output
+=
snippet_zope
%
dict
(
zope_thread_amount
=
backend_configuration
[
'thread-amount'
],
zope_id
=
part_name
,
zope_port
=
current_zope_port
,
**
zope_dict
)
output
+=
snippet_zope
%
dict
(
zope_thread_amount
=
backend_configuration
[
'thread-amount'
],
zope_id
=
part_name
,
zope_port
=
current_zope_port
,
**
zope_dict
)
haproxy_backend_list
.
append
(
'${%(part_name)s:ip}:${%(part_name)s:port}'
%
dict
(
part_name
=
part_name
))
haproxy_backend_list
.
append
(
'${%(part_name)s:ip}:${%(part_name)s:port}'
%
dict
(
part_name
=
part_name
))
# now generate backend access
# now generate backend access
...
...
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