Change in vdsm[master]: stomp: make sure that stomp connection is active before send...

ykaplan at redhat.com ykaplan at redhat.com
Mon Nov 23 16:55:55 UTC 2015


Yeela Kaplan has posted comments on this change.

Change subject: stomp: make sure that stomp connection is active before sending messages
......................................................................


Patch Set 2: Code-Review-1

(2 comments)

https://gerrit.ovirt.org/#/c/49000/2/lib/yajsonrpc/stomp.py
File lib/yajsonrpc/stomp.py:

Line 483:     def _process_connected(self, frame, dispatcher):
Line 484:         self._connected = True
Line 485: 
Line 486:         self.log.debug("Stomp connection established")
Line 487:         self._ready.set()
Do we still need the boolean self._connected?

Maybe we can just change the boolean to be Event object and check is_set instead of the boolean value.
I also like the name _connected better than _ready. easier to understand the context.
Line 488: 
Line 489:     def _process_message(self, frame, dispatcher):
Line 490:         sub_id = frame.headers.get(Headers.SUBSCRIPTION)
Line 491:         if sub_id is None:


Line 599:         self._client.unsubscribe(self)
Line 600:         self._valid = False
Line 601: 
Line 602: 
Line 603: class TimeoutError(Exception):
Why do we need a special exception just for this class?
Especially when it gives us no additional meaningful info?
Can't we use StompError with a meaningful timeout message?


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

Gerrit-MessageType: comment
Gerrit-Change-Id: I4f6881d7966fa47031d027740633ca83c834387f
Gerrit-PatchSet: 2
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Piotr Kliczewski <piotr.kliczewski at gmail.com>
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Nir Soffer <nsoffer 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: gerrit-hooks <automation at ovirt.org>
Gerrit-HasComments: Yes


More information about the vdsm-patches mailing list