Commit c536d375 authored by Xiaowu Zhang's avatar Xiaowu Zhang

stack/erp5: add useful activity tools

parent 86814cc2
...@@ -66,7 +66,7 @@ md5sum = 0969fbb25b05c02ef3c2d437b2f4e1a0 ...@@ -66,7 +66,7 @@ md5sum = 0969fbb25b05c02ef3c2d437b2f4e1a0
[template] [template]
filename = instance.cfg.in filename = instance.cfg.in
md5sum = 50db2da70232c91642c93dc06c982b3c md5sum = e9229b6b3ca344a094f63fef2c7fc2a1
[monitor-template-dummy] [monitor-template-dummy]
filename = dummy.cfg filename = dummy.cfg
...@@ -82,7 +82,7 @@ md5sum = 3e650915959ff31c9c13c84069bbcd35 ...@@ -82,7 +82,7 @@ md5sum = 3e650915959ff31c9c13c84069bbcd35
[template-zope] [template-zope]
filename = instance-zope.cfg.in filename = instance-zope.cfg.in
md5sum = 40574986b5a75e5c888737797ee6973e md5sum = bec70aec9d8961f17b4c93d797cc67f9
[template-balancer] [template-balancer]
filename = instance-balancer.cfg.in filename = instance-balancer.cfg.in
......
...@@ -297,8 +297,9 @@ site-id = {{ site_id }} ...@@ -297,8 +297,9 @@ site-id = {{ site_id }}
mysql-url = {{ slapparameter_dict['mysql-url-list'][0] }} mysql-url = {{ slapparameter_dict['mysql-url-list'][0] }}
inituser = {{ slapparameter_dict['inituser-login'] }} inituser = {{ slapparameter_dict['inituser-login'] }}
{% set mysql = urlparse.urlsplit(slapparameter_dict['mysql-url-list'][0]) -%} {% set mysql = urlparse.urlsplit(slapparameter_dict['mysql-url-list'][0]) -%}
{% set mysql_db = mysql.path.split('/')[1] -%}
sql-connection-string = {{ '%s@erp5-catalog-0:%s %s %s' % ( sql-connection-string = {{ '%s@erp5-catalog-0:%s %s %s' % (
mysql.path.split('/')[1], mysql.port, mysql.username, mysql.password) }} mysql_db, mysql.port, mysql.username, mysql.password) }}
bt5 = {{ slapparameter_dict['bt5'] }} bt5 = {{ slapparameter_dict['bt5'] }}
bt5-repository-url = {{ slapparameter_dict['bt5-repository-url'] }} bt5-repository-url = {{ slapparameter_dict['bt5-repository-url'] }}
id-store-interval = {{ dumps(slapparameter_dict['id-store-interval']) }} id-store-interval = {{ dumps(slapparameter_dict['id-store-interval']) }}
...@@ -459,6 +460,16 @@ post = test ! -s {{ '${' ~ conf_parameter_name ~ ':pid-file}' }} || {{ bin_direc ...@@ -459,6 +460,16 @@ post = test ! -s {{ '${' ~ conf_parameter_name ~ ':pid-file}' }} || {{ bin_direc
) }} ) }}
{% endfor -%} {% endfor -%}
[{{ section("watch_activities") }}]
<= userhosts-wrapper-base
environment +=
MYSQL=${binary-link:target-directory}/mysql
wrapped-command-line = {{ parameter_dict['erp5-location'] }}/product/CMFActivity/bin/${:_buildout_section_name_} "-h erp5-catalog-0 -P {{ mysql.port }} -u {{ mysql.username }} -p{{ mysql.password}} {{ mysql_db }}" 5 3600
wrapper-path = ${buildout:bin-directory}/${:_buildout_section_name_}
[{{ section("wait_activities") }}]
<= watch_activities
[publish] [publish]
recipe = slapos.cookbook:publish.serialised recipe = slapos.cookbook:publish.serialised
zope-address-list = {{ dumps(publish_list) }} zope-address-list = {{ dumps(publish_list) }}
......
...@@ -96,6 +96,7 @@ site-zcml = {{ site_zcml }} ...@@ -96,6 +96,7 @@ site-zcml = {{ site_zcml }}
template-monitor = {{ dumps(template_monitor) }} template-monitor = {{ dumps(template_monitor) }}
extra-path-list = {{ dumps(extra_path_list) }} extra-path-list = {{ dumps(extra_path_list) }}
matplotlibrc = {{ matplotlibrc_location }} matplotlibrc = {{ matplotlibrc_location }}
erp5-location = {{ erp5_location }}
[dynamic-template-zope] [dynamic-template-zope]
<= jinja2-template-base <= jinja2-template-base
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment