Przeglądaj źródła

Make it a list of servers in call

Mark Mine 23 lat temu
rodzic
commit
9894b03b1c
1 zmienionych plików z 6 dodań i 3 usunięć
  1. 6 3
      direct/src/cluster/ClusterClient.py

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

@@ -113,11 +113,14 @@ class ClusterClient(DirectObject.DirectObject):
     def loadModel(self, nodePath):
         pass
 
-    def __call__(self, commandString, fLocally = 1, serverNum = None):
+    def __call__(self, commandString, fLocally = 1, serverList = []):
         # Execute remotely
-        if serverNum is not None:
-            self.serverList[serverNum].sendCommandString(commandString)
+        if serverList:
+            # Passed in list of servers
+            for serverNum in serverList:
+                self.serverList[serverNum].sendCommandString(commandString)
         else:
+            # All servers
             for server in self.serverList:
                 server.sendCommandString(commandString)
         if fLocally: