celery/kombu — pull request #370 by rogerhu (2014-06-18 23:33:23+00:00)
Title: Fix up issues with v3.0.19 release.

Not sure why v3.0.19 is not on this repo. I've taken the release and played the changes on top of it.

There are two issues with kombu/common.py that need to be fixed with this PR. First, the code attempts to avoid declaring exchanges more than once. The problem is that Celery control signals leverage the auto_delete flag, which will delete exchanges when there are no more messages. The other issue appears that the exchanges are not being bound to any channels.

1) Avoid trying to cache entities that have auto_delete=True (i.e. Celery control signals)

2) Bind the entity if it currently is not bound.

Fixes issue https://github.com/celery/kombu/issues/366