celery/celery — pull request #1551 by drazvan (2013-09-17 14:44:32+00:00)
Title: Mixing rate limited and non rate limited tasks

Discovered that if we mix rate limited and non rate limited tasks in the same queue, the non rate limited ones might actually also get limited. I'll illustrate with an example:

```python
@celery.task(name="experiments.ping")
def ping():
print("ping")

@celery.task(name="experiments.pong", rate_limit="2/m")
def pong():
print("pong")

for i in range(100):
experiments.ping.delay()
experiments.pong.delay()
```

The output looks something like this (1 worker instance, concurrency set to 1):
```
ping
pong
ping
ping
ping
ping
[ ... pause 30s...]
pong
ping
[ ... pause 30s ...]
...
```

I understand that this happens because eventually all the pre-fetched tasks will be of type pong, and unless a pong is executed there's no room to fetch new tasks from the broker. Since I did not see this explained anywhere, I thought that the docs should at least warn about this dangerous mix.