I am lazy and killed the inheritance, it was getting messy

This commit is contained in:
Thomas S Hatch 2011-03-03 15:11:32 -07:00
parent a67ae94214
commit 012bffb1d3

View file

@ -119,7 +119,7 @@ class ReqServer(threading.Thread):
self.__bind()
class LocalServer(ReqServer):
class LocalServer(threading.Thread):
'''
Create the localhost communication interface for root clients to connect
to
@ -172,3 +172,23 @@ class LocalServer(ReqServer):
continue
cmd = salt.utils.prep_publish_cmd(message['cmd'])
self.publisher.command(cmd)
def __bind(self):
'''
Binds the reply server
'''
self.clients.bind(self.c_uri)
self.workers.bind(self.w_uri)
for ind in range(int(self.num_threads)):
proc = threading.Thread(target=self.__worker)
proc.start()
zmq.device(zmq.QUEUE, self.clients, self.workers)
def run(self):
'''
Start up the ReqServer
'''
self.__bind()