Commit 52dc04cf authored by Nicolas Delaby's avatar Nicolas Delaby

* Extend options of runUnitTest to configure access to volatile memcached...

* Extend options of runUnitTest to configure access to volatile memcached server and persistent memcached server
* Add helper scripts which are returning configuration values


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@44805 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 630d907f
...@@ -261,6 +261,21 @@ def _getConversionServerDict(): ...@@ -261,6 +261,21 @@ def _getConversionServerDict():
return dict(hostname=conversion_server_hostname, return dict(hostname=conversion_server_hostname,
port=int(conversion_server_port)) port=int(conversion_server_port))
def _getVolatileMemcachedServerDict():
"""Returns a dict with hostname and port for volatile memcached Server
"""
hostname = os.environ.get('volatile_memcached_server_hostname',
'localhost')
port = os.environ.get('volatile_conversion_server_port', '11211')
return dict(hostname=hostname, port=port)
def _getPersistentMemcachedServerDict():
"""Returns a dict with hostname and port for persistent memcached Server
"""
hostname = os.environ.get('persistent_memcached_server_hostname',
'localhost')
port = os.environ.get('persistent_conversion_server_port', '12121')
return dict(hostname=hostname, port=port)
def profile_if_environ(environment_var_name): def profile_if_environ(environment_var_name):
if int(os.environ.get(environment_var_name, 0)): if int(os.environ.get(environment_var_name, 0)):
......
...@@ -98,6 +98,22 @@ Options: ...@@ -98,6 +98,22 @@ Options:
Port number used to connect to conversion server Port number used to connect to conversion server
(Oood), the value will be stored at default preference. (Oood), the value will be stored at default preference.
By default 8008 is used. By default 8008 is used.
--volatile_memcached_server_hostname=STRING
Hostname used to connect to volatile memcached server,
this value will stored on portal_memcached.
By default localhost is used.
--volatile_memcached_server_port=STRING
Port number used to connect to volatile memcached server,
the value will be stored on portal_memcached.
By default 11211 is used.
--persistent_memcached_server_hostname=STRING
Hostname used to connect to persistent memcached server,
this value will stored on portal_memcached.
By default localhost is used.
--persistent_memcached_server_port=STRING
Port number used to connect to persistent memcached server,
the value will be stored on portal_memcached.
By default 12121 is used.
--random_activity_priority=[SEED] --random_activity_priority=[SEED]
Force activities to have a random priority, to make Force activities to have a random priority, to make
random failures (due to bad activity dependencies) random failures (due to bad activity dependencies)
...@@ -608,6 +624,10 @@ def main(argument_list=None): ...@@ -608,6 +624,10 @@ def main(argument_list=None):
"cmf_activity_sql_connection_string=", "cmf_activity_sql_connection_string=",
"conversion_server_port=", "conversion_server_port=",
"conversion_server_hostname=", "conversion_server_hostname=",
"volatile_memcached_server_port=",
"volatile_memcached_server_hostname=",
"persistent_memcached_server_port=",
"persistent_memcached_server_hostname=",
"erp5_catalog_storage=", "erp5_catalog_storage=",
"save", "save",
"load", "load",
...@@ -694,6 +714,14 @@ def main(argument_list=None): ...@@ -694,6 +714,14 @@ def main(argument_list=None):
os.environ["conversion_server_hostname"] = arg os.environ["conversion_server_hostname"] = arg
elif opt == "--conversion_server_port": elif opt == "--conversion_server_port":
os.environ["conversion_server_port"] = arg os.environ["conversion_server_port"] = arg
elif opt == "--volatile_memcached_server_hostname":
os.environ["volatile_memcached_server_hostname"] = arg
elif opt == "--volatile_memcached_server_port":
os.environ["volatile_memcached_server_port"] = arg
elif opt == "--persistent_memcached_server_hostname":
os.environ["persistent_memcached_server_hostname"] = arg
elif opt == "--persistent_memcached_server_port":
os.environ["persistent_memcached_server_port"] = arg
elif opt == "--live_instance": elif opt == "--live_instance":
live_instance_path = arg or real_instance_home live_instance_path = arg or real_instance_home
# following line is only for static files # following line is only for static files
......
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