Changeset - d6ec468112cb
[Not reviewed]
default
0 2 0
drewp@bigasterisk.com - 7 years ago 2018-06-09 02:01:36
drewp@bigasterisk.com
not sure highwatermark setting did what i wanted
Ignore-this: 3a3b2835ea3a30d7fb0e2007a3b06bb2
2 files changed with 2 insertions and 2 deletions:
0 comments (0 inline, 0 general)
bin/collector
Show inline comments
 
@@ -46,13 +46,13 @@ def startZmq(port, collector):
 
    
 
    zf = ZmqFactory()
 
    addr = 'tcp://*:%s' % port
 
    log.info('creating zmq endpoint at %r', addr)
 
    e = ZmqEndpoint('bind', addr)
 
    class Pull(ZmqPullConnection):
 
        highWaterMark = 3
 
        #highWaterMark = 3
 
        def onPull(self, message):
 
            with stats.setAttr.time():
 
                # todo: new compressed protocol where you send all URIs up
 
                # front and then use small ints to refer to devices and
 
                # attributes in subsequent requests.
 
                client, clientSession, settings, sendTime = parseJsonMessage(message[0])
light9/dmxclient.py
Show inline comments
 
@@ -19,13 +19,13 @@ procname = procname.replace('.py', '')
 

	
 
class TwistedZmqClient(object):
 
    def __init__(self, service):
 
        zf = ZmqFactory()
 
        e = ZmqEndpoint('connect', 'tcp://%s:%s' % (service.host, service.port))
 
        class Push(ZmqPushConnection):
 
            highWaterMark = 3
 
            pass # highWaterMark = 3000
 
        self.conn = Push(zf, e)
 
        
 
    def send(self, clientid, levellist):
 
        self.conn.push(json.dumps({'clientid': clientid, 'levellist': levellist}))
 

	
 
def outputlevels(levellist,twisted=0,clientid=_id):
0 comments (0 inline, 0 general)