Change in vdsm[master]: stomp: client side subscription

fromani at redhat.com fromani at redhat.com
Fri Mar 20 08:12:04 UTC 2015


Francesco Romani has posted comments on this change.

Change subject: stomp: client side subscription
......................................................................


Patch Set 10:

(4 comments)

initial review, more will come after

https://gerrit.ovirt.org/#/c/36368/10/lib/yajsonrpc/stomp.py
File lib/yajsonrpc/stomp.py:

Line 288: class AsyncDispatcher(object):
Line 289:     log = logging.getLogger("stomp.AsyncDispatcher")
Line 290: 
Line 291:     def __init__(self, frame_handler, bufferSize=4096):
Line 292:         self._frame_handler = frame_handler
unrelated (but nice) rename?
Line 293:         self._bufferSize = bufferSize
Line 294:         self._parser = Parser()
Line 295:         self._outbuf = None
Line 296:         self._outgoing_heartbeat_in_milis = 0


Line 302:         self._update_outgoing_heartbeat()
Line 303:         self._outgoing_heartbeat_in_milis = outgoing
Line 304: 
Line 305:     def handle_connect(self, dispatcher):
Line 306:         self._outbuf = None
why we do need this now?
Line 307:         self._frame_handler.handle_connect(self)
Line 308: 
Line 309:     def handle_read(self, dispatcher):
Line 310:         try:


https://gerrit.ovirt.org/#/c/36368/10/lib/yajsonrpc/stompReactor.py
File lib/yajsonrpc/stompReactor.py:

Line 74:     def pop_message(self):
Line 75:         return self._outbox.popleft()
Line 76: 
Line 77:     def queue_frame(self, frame):
Line 78:         self._outbox.append(frame)
seems duplicated code. Any chance to factor it out?
Line 79: 
Line 80:     def _cmd_connect(self, dispatcher, frame):
Line 81:         self.log.info("Processing CONNECT request")
Line 82:         version = frame.headers.get("accept-version", None)


https://gerrit.ovirt.org/#/c/36368/10/tests/jsonRpcHelper.py
File tests/jsonRpcHelper.py:

Line 101:                 if handler.NAME == type:
Line 102:                     reactor = handler._reactor
Line 103: 
Line 104:         if not client:
Line 105:             def client(client_socket):
def? maybe something is missing here?
Line 106:                 return StompRpcClient(
Line 107:                     reactor.createClient(client_socket),
Line 108:                     _FAKE_SUB_ID,
Line 109:                     _FAKE_SUB_ID,


-- 
To view, visit https://gerrit.ovirt.org/36368
To unsubscribe, visit https://gerrit.ovirt.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I8e43658f1cebd637ea3abf4396d388afa041ae71
Gerrit-PatchSet: 10
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Saggi Mizrahi <smizrahi at redhat.com>
Gerrit-Reviewer: Dima Kuznetsov <dkuznets at redhat.com>
Gerrit-Reviewer: Francesco Romani <fromani at redhat.com>
Gerrit-Reviewer: Piotr Kliczewski <piotr.kliczewski at gmail.com>
Gerrit-Reviewer: Yaniv Bronhaim <ybronhei at redhat.com>
Gerrit-Reviewer: Yeela Kaplan <ykaplan at redhat.com>
Gerrit-Reviewer: automation at ovirt.org
Gerrit-Reviewer: oVirt Jenkins CI Server
Gerrit-HasComments: Yes


More information about the vdsm-patches mailing list