Change in vdsm[master]: asyncore: dynamic tick support

ybronhei at redhat.com ybronhei at redhat.com
Sun Mar 15 07:33:36 UTC 2015


Yaniv Bronhaim has posted comments on this change.

Change subject: asyncore: dynamic tick support
......................................................................


Patch Set 14:

(2 comments)

https://gerrit.ovirt.org/#/c/37057/14/lib/yajsonrpc/stomp.py
File lib/yajsonrpc/stomp.py:

Line 442:     def _outgoing_heartbeat_expiration_interval(self):
Line 443:         since_last_update = (monotonic_time() - self._lastOutgoingTimeStamp)
Line 444:         return (self._outgoing_heartbeat_in_milis / 1000.0) - since_last_update
Line 445: 
Line 446:     def next_check_interval(self, dispatcher):
im confused why this function gets dispatcher.. can you show me what am i missing?
Line 447:         if self._outgoing_heartbeat_in_milis == 0:
Line 448:             return None
Line 449: 
Line 450:         return max(self._outgoing_heartbeat_expiration_interval(), 0)


Line 444:         return (self._outgoing_heartbeat_in_milis / 1000.0) - since_last_update
Line 445: 
Line 446:     def next_check_interval(self, dispatcher):
Line 447:         if self._outgoing_heartbeat_in_milis == 0:
Line 448:             return None
and why not returning -1? None might refer to 0 in some languages
Line 449: 
Line 450:         return max(self._outgoing_heartbeat_expiration_interval(), 0)
Line 451: 
Line 452:     def handle_write(self, dispatcher):


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

Gerrit-MessageType: comment
Gerrit-Change-Id: I44b38e961d46e914bb687c924ba4e83f38371d5b
Gerrit-PatchSet: 14
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Saggi Mizrahi <smizrahi at redhat.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: 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