diff --git a/app/celery_setup/generate_config.py b/app/celery_setup/generate_config.py index 9e9c51d..d7f8cb6 100644 --- a/app/celery_setup/generate_config.py +++ b/app/celery_setup/generate_config.py @@ -42,7 +42,11 @@ def add_password_to_url(url, password): return re.sub(r'((?:redis|sentinel)://)', fr'\1:{password}@', url) -def generate_config(redis_config: RedisConfig, sentinel_config: SentinelConfig) -> dict: +def generate_config(redis_config: RedisConfig, sentinel_config: SentinelConfig = None) -> dict: + """ + :param redis_config: required, whether connecting to redis or redis sentinel, the redis config is required. + :param sentinel_config: optional, only pass if connecting to redis sentinel + """ if sentinel_config.is_configured(): redisdns = dns.resolver.resolve(sentinel_config.url, 'A') addressstring = []