Merge branch 'djmitche/call-heartbeat'

This commit is contained in:
Ask Solem 2014-01-13 16:15:07 +00:00
commit 11933461aa
1 changed files with 1 additions and 1 deletions

View File

@ -188,11 +188,11 @@ class ConsumerMixin(object):
for i in limit and range(limit) or count():
if self.should_stop:
break
conn.heartbeat_check()
self.on_iteration()
try:
conn.drain_events(timeout=safety_interval)
except socket.timeout:
conn.heartbeat_check()
elapsed += safety_interval
if timeout and elapsed >= timeout:
raise