(20250612) - changed redis connection string.

This commit is contained in:
yatmesh
2025-06-12 12:09:31 +05:30
parent c7646ab895
commit f7c4c3ad5d
+16 -7
View File
@@ -47,7 +47,7 @@ from utils_v2.system import files
from utils_v2.date_time import date_time
from utils_v2.database.async_mongo_v2 import AsyncMongo
from utils_v2.queue.kafka.controllers.async_kafka import ConsumerKafka, get_ssl_context
from utils_v2.cache.async_redis_cache_v2 import AsyncRedisCache
from utils_v2.cache.async_redis_cache_v3 import AsyncRedisCache
from utils_v2.serialization.json_serializer import JSONSerializer
# To make HTTP calls:
@@ -340,9 +340,12 @@ async def init(
bootstrap_servers = consumer_creds["config"]["bootstrapServers"],
security_protocol = consumer_creds["config"].get("securityProtocol", "PLAINTEXT"),
ssl_context = get_ssl_context(
ca_file = consumer_creds["config"].get("caFile"),
cert_file = consumer_creds["config"].get("certFile"),
key_file = consumer_creds["config"].get("keyFile"),
# ca_file = consumer_creds["config"].get("caFile"),
# cert_file = consumer_creds["config"].get("certFile"),
# key_file = consumer_creds["config"].get("keyFile"),
ca_file="/home/python-dev-debug/PycharmProjects/api_utils_converse_v2/creds/kafka/cert_authority.pem",
cert_file="/home/python-dev-debug/PycharmProjects/api_utils_converse_v2/creds/kafka/fullchain.pem",
key_file="/home/python-dev-debug/PycharmProjects/api_utils_converse_v2/creds/kafka/privkey.pem",
),
serializer = JSONSerializer(),
debug = debug
@@ -357,8 +360,9 @@ async def init(
# ┛┗┗ ┗┻┗┛ ┗┛┗┻┗┛┗┗
redis_cache = AsyncRedisCache(
connection_string = script_cred["redisCache"]["general"]["connectionString"],
serializer = JSONSerializer(),
sentinel_json=script_cred["redisCache"]["general"]["sentinelJson"],
# connection_string = script_cred["redisCache"]["general"]["connectionString"],
# serializer = JSONSerializer(),
debug = debug,
debug_prefix = "General Cache | "
)
@@ -515,7 +519,7 @@ if __name__ == "__main__":
"-a", "--host",
type = str,
help = "The host for the app. e.g.: '0.0.0.0' or '127.0.0.1'.",
default = "127.0.0.1"
default = "0.0.0.0"
)
parser.add_argument(
"-p", "--port",
@@ -545,6 +549,11 @@ if __name__ == "__main__":
printer(str(args.debug))
printer.disable()
# asyncio.run(init(
# script_id=args.script_id,
# debug=args.debug
# ))
# Run the gateway:
freeze_support()
uvicorn.run(