:py:mod:`EVECelery.clients.ClientRedis` ======================================= .. py:module:: EVECelery.clients.ClientRedis Module Contents --------------- Classes ~~~~~~~ .. autoapisummary:: EVECelery.clients.ClientRedis.ConfigRedis EVECelery.clients.ClientRedis.ClientRedis EVECelery.clients.ClientRedis.ClientRedisResultBackend EVECelery.clients.ClientRedis.ClientRedisLocks EVECelery.clients.ClientRedis.ClientRedisCache .. py:class:: ConfigRedis Bases: :py:obj:`pydantic.BaseModel` .. py:attribute:: user :type: str .. py:attribute:: password :type: str .. py:attribute:: host :type: str .. py:attribute:: port :type: int .. py:attribute:: db :type: int .. py:method:: valid_db_number(v) .. py:class:: ClientRedis(user: str, password: str, host: str, port: int, db: int) Bases: :py:obj:`EVECelery.clients.BaseClient.BaseClient` Wrapper around Redis client that configures connection parameters from OS env variables. :param user: Redis user :param password: Redis password :param host: Redis hostname :param port: Redis port - normally 6379 :param db: Redis DB - namespace for all queues .. py:property:: redis :type: redis.Redis .. py:property:: connection_str Returns the connection string for use by Celery .. py:method:: check_connection() -> bool Check that a connection is successful, else raise exception .. py:class:: ClientRedisResultBackend(user: Optional[str] = None, password: Optional[str] = None, host: Optional[str] = None, port: Optional[int] = None, db: Optional[int] = None) Bases: :py:obj:`ClientRedis` The result backend client for Celery .. py:class:: ClientRedisLocks(user: Optional[str] = None, password: Optional[str] = None, host: Optional[str] = None, port: Optional[int] = None, db: Optional[int] = None) Bases: :py:obj:`ClientRedis` The redis connection for cache by tasks. If env variables are not explicitly configured for this client it will use the same database as the result backend. .. py:class:: ClientRedisCache(user: Optional[str] = None, password: Optional[str] = None, host: Optional[str] = None, port: Optional[int] = None, db: Optional[int] = None) Bases: :py:obj:`ClientRedis` The redis connection for cache by tasks. If env variables are not explicitly configured for this client it will use the same database as the result backend.