Overview
Celery 5.4, released on April 18, 2024, adds Redis Sentinel support for high availability.
Main Features
Redis Sentinel
The Redis broker now supports Sentinel for automatic failover when the master goes down.
python
from celery import Celery
app = Celery('tasks')
app.config_from_object({
'broker_url': 'sentinel://sentinel1:26379;sentinel://sentinel2:26379',
'broker_transport_options': {
'master_name': 'mymaster',
},
})
@app.task
def add(x, y):
return x + y
