Skip to content

ronaldodduarte/redis_sentinel_connector

Repository files navigation

The idea behind this package is possibility to you use some client or something like the Metabase for collect and analyse logs of your application.

Its need two environments variables:

  • TYPE = 'TEST' or 'DEV'

    • TEST: You will use fakeredis and not need use Redis instance. (Don't need environment REDIS_URL)
    • DEV: Use this if You has a local Redis like Docker Redis. (Don't need environment REDIS_URL)
  • REDIS_URL = 'complete_redis_sentinel_url'

Sample:

from redis_sentinel_connector import RedisConnector
redis_connector = RedisConnector().connect()

Or pass a variable with the complete url to the connect function

Sample:

from redis_sentinel_connector import RedisConnector
SENTINEL_URL = "sentinel://:testefoobar@host1.sentinel.domain.com:26379,host2.sentinel.domain.com:26379,host3-155915407905.sentinel.domain.com:26379/service_name:redisservice"
redis_connector = RedisConnector().connect(SENTINEL_URL)

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages