mirror of https://github.com/celery/kombu.git
Merge branch 'djmitche/call-heartbeat'
This commit is contained in:
commit
11933461aa
|
@ -188,11 +188,11 @@ class ConsumerMixin(object):
|
||||||
for i in limit and range(limit) or count():
|
for i in limit and range(limit) or count():
|
||||||
if self.should_stop:
|
if self.should_stop:
|
||||||
break
|
break
|
||||||
conn.heartbeat_check()
|
|
||||||
self.on_iteration()
|
self.on_iteration()
|
||||||
try:
|
try:
|
||||||
conn.drain_events(timeout=safety_interval)
|
conn.drain_events(timeout=safety_interval)
|
||||||
except socket.timeout:
|
except socket.timeout:
|
||||||
|
conn.heartbeat_check()
|
||||||
elapsed += safety_interval
|
elapsed += safety_interval
|
||||||
if timeout and elapsed >= timeout:
|
if timeout and elapsed >= timeout:
|
||||||
raise
|
raise
|
||||||
|
|
Loading…
Reference in New Issue