mirror of
https://github.com/saltstack/salt.git
synced 2025-04-17 10:10:20 +00:00
I am lazy and killed the inheritance, it was getting messy
This commit is contained in:
parent
a67ae94214
commit
012bffb1d3
1 changed files with 21 additions and 1 deletions
|
@ -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()
|
||||
|
|
Loading…
Add table
Reference in a new issue