CELERY_QUEUES = Queue('important', exchange=Exchange('important'),
    routing_key='important', queue_arguments={'x-max-length': 10}),
app = Celery('tasks')
app.config_from_object(Config)

@app.task(queue='important')
def process_data(x):
    pass
Celery: how to limit number of tasks in queue and stop feeding when full?