Ensure rates are taken only from push queues
@@ -139,7 +139,8 @@ class ProjectPushWorkerManager(object):
rates = {'default': '5/s'}
else:
queues = json.loads(queue_config)['queue']
- rates = {queue: queues[queue]['rate'] for queue in queues
+ rates = {
+ queue_name: queue['rate'] for queue_name, queue in queues.items()
if 'mode' not in queue or queue['mode'] == 'push'}
config_location = os.path.join(CELERY_CONFIG_DIR,
