Change in vdsm[master]: stomp: subscription cleanup when connection lost

ykaplan at redhat.com ykaplan at redhat.com
Wed Jun 10 15:19:15 UTC 2015


Yeela Kaplan has posted comments on this change.

Change subject: stomp: subscription cleanup when connection lost
......................................................................


Patch Set 20:

(1 comment)

https://gerrit.ovirt.org/#/c/39969/20/lib/yajsonrpc/stompreactor.py
File lib/yajsonrpc/stompreactor.py:

Line 277:             self._messageHandler((self._server, self, data))
Line 278: 
Line 279:     def clean(self):
Line 280:         if hasattr(self._async_client, 'remove_subscriptions'):
Line 281:             self._async_client.remove_subscriptions()
> I prefer to have small methods responsible for single action.
I agree with wanting a small method,
but a 2-line method for close is as small as it gets.
And close does these 2 actions anyway, so you have no way to avoid it.
Additionally, close is the only place we use clean, so I still think it's unnecessary...
Line 282: 
Line 283: 
Line 284: class StompServer(object):
Line 285:     log = logging.getLogger("yajsonrpc.StompServer")


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

Gerrit-MessageType: comment
Gerrit-Change-Id: Iff05e4ff9d336dbfddf80002bad5bcd0dbac697f
Gerrit-PatchSet: 20
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Piotr Kliczewski <piotr.kliczewski at gmail.com>
Gerrit-Reviewer: Dima Kuznetsov <dkuznets at redhat.com>
Gerrit-Reviewer: Francesco Romani <fromani at redhat.com>
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Nir Soffer <nsoffer at redhat.com>
Gerrit-Reviewer: Piotr Kliczewski <piotr.kliczewski at gmail.com>
Gerrit-Reviewer: Vinzenz Feenstra <vfeenstr at redhat.com>
Gerrit-Reviewer: Yaniv Bronhaim <ybronhei at redhat.com>
Gerrit-Reviewer: Yeela Kaplan <ykaplan at redhat.com>
Gerrit-Reviewer: automation at ovirt.org
Gerrit-HasComments: Yes


More information about the vdsm-patches mailing list