Set the identity on the minions

This prevents ram overusage in the master pub interface when using the
WAN autohealing system, this fixes #1094, make sure the master has also
been updated or this could cause a larger memory leak on the master
This commit is contained in:
Thomas S Hatch 2012-04-18 13:15:39 -06:00
parent 3d584cd229
commit 69a22af7de

View File

@ -473,6 +473,7 @@ class Minion(object):
context = zmq.Context()
socket = context.socket(zmq.SUB)
socket.setsockopt(zmq.SUBSCRIBE, '')
socket.setsockopt(zmq.IDENTITY, self.opts['id'])
socket.connect(self.master_pub)
if self.opts['sub_timeout']:
last = time.time()
@ -498,6 +499,7 @@ class Minion(object):
socket.close()
socket = context.socket(zmq.SUB)
socket.setsockopt(zmq.SUBSCRIBE, '')
socket.setsockopt(zmq.IDENTITY, self.opts['id'])
socket.connect(self.master_pub)
last = time.time()
time.sleep(0.05)