Change in vdsm[master]: stomp: creation of outbox class

piotr.kliczewski at gmail.com piotr.kliczewski at gmail.com
Tue May 19 07:32:06 UTC 2015


Piotr Kliczewski has posted comments on this change.

Change subject: stomp: creation of outbox class
......................................................................


Patch Set 2:

(3 comments)

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

Line 278:         except IndexError:
Line 279:             return None
Line 280: 
Line 281: 
Line 282: class Outbox(object):
> This class does not add any behavior. The only addition is the peek method 
Initially we used deque and I was asked to wrap/adopt it and share this implementation.
Line 283: 
Line 284:     def __init__(self):
Line 285:         self._outbox = deque()
Line 286: 


Line 292: 
Line 293:     def pop(self):
Line 294:         return self._outbox.popleft()
Line 295: 
Line 296:     def add_right(self, element):
> append_right?
I am not really sure whether we want to follow deque so closely. I would go with add_first and add_last.
Line 297:         self._outbox.append(element)
Line 298: 
Line 299:     def add_left(self, element):
Line 300:         self._outbox.appendleft(element)


Line 295: 
Line 296:     def add_right(self, element):
Line 297:         self._outbox.append(element)
Line 298: 
Line 299:     def add_left(self, element):
> append_left?
Answer above.
Line 300:         self._outbox.appendleft(element)
Line 301: 
Line 302: 
Line 303: class AsyncDispatcher(object):


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

Gerrit-MessageType: comment
Gerrit-Change-Id: I2020b05393daeafaed73f628cf441305a2d52354
Gerrit-PatchSet: 2
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Piotr Kliczewski <piotr.kliczewski at gmail.com>
Gerrit-Reviewer: Dan Kenigsberg <danken at redhat.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: 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