Skip to main content

A Redis Cluster backend for Celery

Project description

Celery Redis Cluster

A Redis Cluster backend implementation for Celery. This package extends Celery's Redis backend to work with Redis Cluster, providing better scalability and high availability through Redis Cluster's sharding and replication capabilities.

Installation

pip install celery-redis-cluster

After installation new backends are automatically registered with Celery:

  • redis+cluster
  • rediss+cluster

Usage

To use the Redis Cluster backend in your Celery application:

from celery import Celery

from celery_redis_cluster_backend import install_redis_cluster_backend


app = Celery('your_app',
             broker='redis://localhost:6379/0',
             backend='redis+cluster://localhost:6379/0')

Configuration

The backend inherits all configuration options from Celery's Redis backend, with the addition of Redis Cluster specific handling. Here's an example configuration:

app.conf.update(
    result_backend='redis+cluster://localhost:6379/0',
    redis_backend_use_ssl={
        'ssl_cert_reqs': None,
        'ssl_ca_certs': None,
        'ssl_certfile': None,
        'ssl_keyfile': None
    },
    redis_max_connections=None,
    redis_socket_timeout=120.0,
    redis_socket_connect_timeout=120.0,
    redis_cluster_retry_on_timeout=True,
    redis_cluster_max_retry_on_timeout=3,
)

Requirements

  • Python >= 3.8
  • Celery >= 5.3.0
  • redis >= 4.5.0

License

This project is licensed under the MIT License - see the LICENSE file for details.

Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

celery_redis_cluster-0.2.3.tar.gz (4.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

celery_redis_cluster-0.2.3-py3-none-any.whl (4.6 kB view details)

Uploaded Python 3

File details

Details for the file celery_redis_cluster-0.2.3.tar.gz.

File metadata

  • Download URL: celery_redis_cluster-0.2.3.tar.gz
  • Upload date:
  • Size: 4.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.1

File hashes

Hashes for celery_redis_cluster-0.2.3.tar.gz
Algorithm Hash digest
SHA256 0d3476a1095e9e763cc371848ead5f0068bed18f999e363e8dad7139cf3a3222
MD5 d160dc466527355f02b9b4ee7351b10c
BLAKE2b-256 68262974f1268b21dad968a0ed73495915cdc24cd05172e217169a9e1e142d2e

See more details on using hashes here.

File details

Details for the file celery_redis_cluster-0.2.3-py3-none-any.whl.

File metadata

File hashes

Hashes for celery_redis_cluster-0.2.3-py3-none-any.whl
Algorithm Hash digest
SHA256 af7b57f4edf663cd20a5b3c1af4126dda937141b4adeb57cec0252faf6d0e241
MD5 3ad9a8ef15d40e11ffeb36ba08b77b5d
BLAKE2b-256 1a66f9a52f3baaa43a082a2770792b525b5713f14421978c1338fd8b6d3b63c3

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page