Skip to content

Instantly share code, notes, and snippets.

View brouberol's full-sized avatar

Balthazar Rouberol brouberol

View GitHub Profile
@reclosedev
reclosedev / celery_sentinel.py
Last active April 24, 2019 00:01
Temporary hack. Redis Sentinel support for Celery.
"""
This module adds Redis Sentinel transport support to Celery.
Current version of celery doesn't support Redis sentinel client, which is must have for automatic failover.
To use it::
import register_celery_alias
register_celery_alias("redis-sentinel")
celery = Celery(..., broker="redis-sentinel://...", backend="redis-sentinel://...")