Closed kimsterv closed 12 years ago
This is definitely not the behavior I intended. This sounds like a celery bug. Do you know if it's reported, or fixed in a later version or something? I'm fairly positive that this is not how it's supposed to work.
I don't think it's a bug. The documentation is a little unclear for rate_limit (http://docs.celeryproject.org/en/latest/userguide/tasks.html?highlight=rate_limit#Task.rate_limit), but I found this thread on StackOverflow: http://stackoverflow.com/questions/7541931/how-is-rate-limit-enforced-in-celery. I haven't been able to dig into the code, and also don't understand how the scheduler works yet.
I talked to ask (celery author) on IRC and he said that this is absolutely not the case. The person on stack overflow is very wrong. Ask also added that the token bucket algorithm that the person mentioned doesn't necessarily mean that items are discarded.
Thanks so much for looking into this! I see the correct response now on Stack Overflow.
I know it's not a required setting, but it appears as though celery will just discard the tasks if this rate_limit is exceeded. In other words, if this is set, and you're exceeded the rate_limit sending emails, the emails will just get discarded which is probably not the behavior you intended.
Please correct me if I'm wrong.