Yaniv Bronhaim has posted comments on this change.

Change subject: jsonrpc: events
......................................................................


Patch Set 16: Code-Review-1

(5 comments)

https://gerrit.ovirt.org/#/c/38069/16/lib/yajsonrpc/stompReactor.py
File lib/yajsonrpc/stompReactor.py:

Line 28: _STATE_LEN = "Waiting for message length"
Line 29: _STATE_MSG = "Waiting for message"
Line 30: 
Line 31: 
Line 32: _DEFAULT_RESPONSE_DESTINATION = "jms.topic.vdsm_legacy_responses"
fix it separately.

please try to avoid fixing other places in the code in such big, important and 
very specific patches - it makes the review much harder and the log can confuse 
others in the future.
Line 33: _DEFAULT_REQUEST_DESTINATION = "jms.topic.vdsm_legacy_requests"
Line 34: 
Line 35: 
Line 36: def parseHeartBeatHeader(v):


Line 335:         self._stompConn.connect()
Line 336: 
Line 337:     def handle_message(self, sub, frame):
Line 338:         if self._messageHandler is not None:
Line 339:             self._messageHandler((self, frame.body))
I knew it :) fix where you introduce it
Line 340: 
Line 341:     def setMessageHandler(self, msgHandler):
Line 342:         self._messageHandler = msgHandler
Line 343:         self.check_read()


https://gerrit.ovirt.org/#/c/38069/16/vdsm/clientIF.py
File vdsm/clientIF.py:

Line 17
Line 18
Line 19
Line 20
Line 21
stick to the patch ...


Line 145:     def _send_notification(self, message, destination):
Line 146:         json_binding = self.bindings['jsonrpc']
Line 147:         server = json_binding.getStompReactor().server
Line 148:         self.log.debug("Sending event %s", message)
Line 149:         server.send(message)
why not 

self.bindings['jsonrpc'].getStompReactor().server.send(message)

and log it inside Notification
Line 150: 
Line 151:     def contEIOVms(self, sdUUID, isDomainStateValid):
Line 152:         # This method is called everytime the onDomainStateChange
Line 153:         # event is emitted, this event is emitted even when a domain 
goes


https://gerrit.ovirt.org/#/c/38069/16/vdsm/rpc/BindingJsonRpc.py
File vdsm/rpc/BindingJsonRpc.py:

Line 39: 
Line 40:     def _onAccept(self, client):
Line 41:         client.setMessageHandler(self._server.queueRequest)
Line 42: 
Line 43:     def getStompReactor(self):
make it a property .
Line 44:         return self._reactor
Line 45: 
Line 46:     def start(self):
Line 47:         t = threading.Thread(target=self._server.serve_requests,


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

Gerrit-MessageType: comment
Gerrit-Change-Id: Id27b5ca1773139932eb5cb16921d5abec4991c5e
Gerrit-PatchSet: 16
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Saggi Mizrahi <smizr...@redhat.com>
Gerrit-Reviewer: Dima Kuznetsov <dkuzn...@redhat.com>
Gerrit-Reviewer: Francesco Romani <from...@redhat.com>
Gerrit-Reviewer: Piotr Kliczewski <piotr.kliczew...@gmail.com>
Gerrit-Reviewer: Yaniv Bronhaim <ybron...@redhat.com>
Gerrit-Reviewer: automat...@ovirt.org
Gerrit-Reviewer: oVirt Jenkins CI Server
Gerrit-HasComments: Yes
_______________________________________________
vdsm-patches mailing list
vdsm-patches@lists.fedorahosted.org
https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches

Reply via email to