Closed kashalls closed 1 year ago
Sorry about the no information being posted, needed a bit to type this up. I'm unfamiliar with Python so I'm doing my best here.
According to the celery backends and brokers documentation, when connecting to a Redis Sentinel Cluster you need to bind app.conf.broker_transport_options
with { 'master_name': "cluster1" }
with cluster1
being the name of the cluster.
So in the case of using shynet inside of a kubernetes cluster using bitnami's redis chart (see my use case here), you would need to pass your env with this:
BROKER_TRANSPORT_OPTIONS: "{'master_name':'redis-master'}"
CELERY_BROKER_URL: "sentinel://redis-node-0.redis-headless.default.svc.cluster.local:26379/6;sentinel://redis-node-1.redis-headless.default.svc.cluster.local:26379/6;sentinel://redis-node-2.redis-headless.default.svc.cluster.local:26379/6"
AFAIK, this should be all that is needed to make this work after talking with @ZandercraftGames who avidly uses shynet itself.
Thanks!
Adds an option for celery transport options to allow sentinel options with redis Solves #285.