(20250612) - changed redis connection string.
This commit is contained in:
@@ -47,7 +47,7 @@ from utils_v2.system import files
|
|||||||
from utils_v2.date_time import date_time
|
from utils_v2.date_time import date_time
|
||||||
from utils_v2.database.async_mongo_v2 import AsyncMongo
|
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.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
|
from utils_v2.serialization.json_serializer import JSONSerializer
|
||||||
|
|
||||||
# To make HTTP calls:
|
# To make HTTP calls:
|
||||||
@@ -340,9 +340,12 @@ async def init(
|
|||||||
bootstrap_servers = consumer_creds["config"]["bootstrapServers"],
|
bootstrap_servers = consumer_creds["config"]["bootstrapServers"],
|
||||||
security_protocol = consumer_creds["config"].get("securityProtocol", "PLAINTEXT"),
|
security_protocol = consumer_creds["config"].get("securityProtocol", "PLAINTEXT"),
|
||||||
ssl_context = get_ssl_context(
|
ssl_context = get_ssl_context(
|
||||||
ca_file = consumer_creds["config"].get("caFile"),
|
# ca_file = consumer_creds["config"].get("caFile"),
|
||||||
cert_file = consumer_creds["config"].get("certFile"),
|
# cert_file = consumer_creds["config"].get("certFile"),
|
||||||
key_file = consumer_creds["config"].get("keyFile"),
|
# 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(),
|
serializer = JSONSerializer(),
|
||||||
debug = debug
|
debug = debug
|
||||||
@@ -357,8 +360,9 @@ async def init(
|
|||||||
# ┛┗┗ ┗┻┗┛ ┗┛┗┻┗┛┗┗
|
# ┛┗┗ ┗┻┗┛ ┗┛┗┻┗┛┗┗
|
||||||
|
|
||||||
redis_cache = AsyncRedisCache(
|
redis_cache = AsyncRedisCache(
|
||||||
connection_string = script_cred["redisCache"]["general"]["connectionString"],
|
sentinel_json=script_cred["redisCache"]["general"]["sentinelJson"],
|
||||||
serializer = JSONSerializer(),
|
# connection_string = script_cred["redisCache"]["general"]["connectionString"],
|
||||||
|
# serializer = JSONSerializer(),
|
||||||
debug = debug,
|
debug = debug,
|
||||||
debug_prefix = "General Cache | "
|
debug_prefix = "General Cache | "
|
||||||
)
|
)
|
||||||
@@ -515,7 +519,7 @@ if __name__ == "__main__":
|
|||||||
"-a", "--host",
|
"-a", "--host",
|
||||||
type = str,
|
type = str,
|
||||||
help = "The host for the app. e.g.: '0.0.0.0' or '127.0.0.1'.",
|
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(
|
parser.add_argument(
|
||||||
"-p", "--port",
|
"-p", "--port",
|
||||||
@@ -545,6 +549,11 @@ if __name__ == "__main__":
|
|||||||
printer(str(args.debug))
|
printer(str(args.debug))
|
||||||
printer.disable()
|
printer.disable()
|
||||||
|
|
||||||
|
# asyncio.run(init(
|
||||||
|
# script_id=args.script_id,
|
||||||
|
# debug=args.debug
|
||||||
|
# ))
|
||||||
|
|
||||||
# Run the gateway:
|
# Run the gateway:
|
||||||
freeze_support()
|
freeze_support()
|
||||||
uvicorn.run(
|
uvicorn.run(
|
||||||
|
|||||||
Reference in New Issue
Block a user