|
@@ -48,7 +48,11 @@ def asynloop(obj, connection, consumer, blueprint, hub, qos,
|
|
# maxtasksperchild will mess up metrics.
|
|
# maxtasksperchild will mess up metrics.
|
|
if not obj.restart_count and not obj.pool.did_start_ok():
|
|
if not obj.restart_count and not obj.pool.did_start_ok():
|
|
raise WorkerLostError('Could not start worker processes')
|
|
raise WorkerLostError('Could not start worker processes')
|
|
- loop = hub._loop(propagate=errors)
|
|
|
|
|
|
+
|
|
|
|
+ # FIXME: Use loop.run_forever
|
|
|
|
+ # Tried and works, but no time to test properly before release.
|
|
|
|
+ hub.propagate_errors = errors
|
|
|
|
+ loop = hub.create_loop()
|
|
|
|
|
|
try:
|
|
try:
|
|
while blueprint.state == RUN and obj.connection:
|
|
while blueprint.state == RUN and obj.connection:
|
|
@@ -67,7 +71,7 @@ def asynloop(obj, connection, consumer, blueprint, hub, qos,
|
|
try:
|
|
try:
|
|
next(loop)
|
|
next(loop)
|
|
except StopIteration:
|
|
except StopIteration:
|
|
- loop = hub._loop(propagate=errors)
|
|
|
|
|
|
+ loop = hub.create_loop()
|
|
finally:
|
|
finally:
|
|
try:
|
|
try:
|
|
hub.close()
|
|
hub.close()
|