فهرست منبع

To allow different cluster daemon client

Mark Mine 21 سال پیش
والد
کامیت
98bf9bd0a7
1فایلهای تغییر یافته به همراه6 افزوده شده و 2 حذف شده
  1. 6 2
      direct/src/cluster/ClusterClient.py

+ 6 - 2
direct/src/cluster/ClusterClient.py

@@ -15,8 +15,12 @@ class ClusterClient(DirectObject.DirectObject):
     def __init__(self, configList, clusterSyncFlag):
     def __init__(self, configList, clusterSyncFlag):
         # First start up servers using direct daemon
         # First start up servers using direct daemon
         # What is the name of the client machine?
         # What is the name of the client machine?
-        clusterDaemonClient = os.popen('uname -n').read()
-        clusterDaemonClient = clusterDaemonClient.replace('\n', '')
+        clusterDaemonClient = base.config.GetString(
+            'cluster-daemon-client', 'None')
+        if clusterDaemonClient == 'None':
+            clusterDaemonClient = os.popen('uname -n').read()
+            clusterDaemonClient = clusterDaemonClient.replace('\n', '')
+        print 'CLIENT', clusterDaemonClient
         # What daemon port are we using to communicate between client/servers
         # What daemon port are we using to communicate between client/servers
         clusterDaemonPort = base.config.GetInt(
         clusterDaemonPort = base.config.GetInt(
             'cluster-daemon-port', CLUSTER_DAEMON_PORT)
             'cluster-daemon-port', CLUSTER_DAEMON_PORT)