[Checkins] SVN: Sandbox/J1m/zkzopeserver/src/zc/zkzopeserver/ Be less flexible wrt monitor-server addresss format, at least not
Jim Fulton
jim at zope.com
Sun Dec 11 19:06:36 UTC 2011
Log message for revision 123687:
Be less flexible wrt monitor-server addresss format, at least not
without testing the flexibility.
Changed:
U Sandbox/J1m/zkzopeserver/src/zc/zkzopeserver/README.txt
U Sandbox/J1m/zkzopeserver/src/zc/zkzopeserver/__init__.py
-=-
Modified: Sandbox/J1m/zkzopeserver/src/zc/zkzopeserver/README.txt
===================================================================
--- Sandbox/J1m/zkzopeserver/src/zc/zkzopeserver/README.txt 2011-12-11 19:01:45 UTC (rev 123686)
+++ Sandbox/J1m/zkzopeserver/src/zc/zkzopeserver/README.txt 2011-12-11 19:06:35 UTC (rev 123687)
@@ -45,10 +45,8 @@
monitor_server
A ``zc.monitor`` server address.
- The value can be a host name, a port or a host:port address. If
- the port isn't specified, it defaults to ``0``. If the host isn't
- specified, it defaults to ```127.0.0.1```. The value ``true`` is
- an alias for ``0``. See `Monitor server`_ below.
+ The value is an address of the form HOST:PORT. See `Monitor
+ server`_ below. (Host can be empty to listen on all interfaces.)
.. test
@@ -101,7 +99,7 @@
use = egg:zc.zkzopeserver
zookeeper = zookeeper.example.com:2181
path = /fooservice/providers
- monitor_server = true
+ monitor_server = 127.0.0.1:0
.. -> server_config
Modified: Sandbox/J1m/zkzopeserver/src/zc/zkzopeserver/__init__.py
===================================================================
--- Sandbox/J1m/zkzopeserver/src/zc/zkzopeserver/__init__.py 2011-12-11 19:01:45 UTC (rev 123686)
+++ Sandbox/J1m/zkzopeserver/src/zc/zkzopeserver/__init__.py 2011-12-11 19:06:35 UTC (rev 123687)
@@ -57,13 +57,7 @@
props = {}
if monitor_server:
- host, port = '127.0.0.1', 0
- if ':' in monitor_server:
- host, port = monitor.rsplit(':', 1)
- elif re.match('\d+$', monitor_server):
- port = monitor_server
- elif monitor_server != 'true':
- host = monitor_server
+ host, port = monitor_server.rsplit(':', 1)
global zc
import zc.monitor
props['monitor'] = "%s:%s" % zc.monitor.start((host, int(port)))
More information about the checkins
mailing list