Skip to content

Commit

Permalink
prevent consuming queue before ready on startup (#3752)
Browse files Browse the repository at this point in the history
  • Loading branch information
alanhamlett authored and thedrow committed Feb 16, 2017
1 parent 9f7adf4 commit 4d63867
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions celery/worker/loops.py
Expand Up @@ -44,10 +44,10 @@ def asynloop(obj, connection, consumer, blueprint, hub, qos,
_enable_amqheartbeats(hub.timer, connection, rate=hbrate)

consumer.on_message = on_task_received
consumer.consume()
obj.on_ready()
obj.controller.register_with_event_loop(hub)
obj.register_with_event_loop(hub)
consumer.consume()
obj.on_ready()

# did_start_ok will verify that pool processes were able to start,
# but this will only work the first time we start, as
Expand Down

0 comments on commit 4d63867

Please sign in to comment.