(20250101) A more formal Tick-In script has been created.
This commit is contained in:
@@ -79,6 +79,23 @@ from icecream import IceCreamDebugger
|
||||
# *****************************************************************************************************************
|
||||
|
||||
|
||||
# def filter_origins(origin):
|
||||
#
|
||||
# """
|
||||
# Pass this function to the SocketIO server to check whether, or not, a particular origin is allowed to connect.
|
||||
# :param origin: The origin received in the
|
||||
# :return: True if this origin is allowed, else False.
|
||||
# """
|
||||
#
|
||||
# # Check if the origin is in the allowed list:
|
||||
# for allowed_origin in allowed_origins:
|
||||
# if regex.match(origin, allowed_origin):
|
||||
# return True
|
||||
#
|
||||
# # Reject all other origins:
|
||||
# return False
|
||||
|
||||
|
||||
# Debugging:
|
||||
printer = IceCreamDebugger(prefix = "Tick-Disp, | ", includeContext = True)
|
||||
printer.disable()
|
||||
@@ -371,8 +388,8 @@ async def init():
|
||||
|
||||
global redis_cache
|
||||
redis_cache = AsyncRedisCache(
|
||||
# connection_string = r"redis://:dc4da94197c843ab6a730113c2b801d9@192.168.2.251/0",
|
||||
connection_string = r"redis://:dc4da94197c843ab6a730113c2b801d9@wtt.ditscentre.in/0",
|
||||
connection_string = r"redis://:dc4da94197c843ab6a730113c2b801d9@192.168.2.251/0",
|
||||
# connection_string = r"redis://:dc4da94197c843ab6a730113c2b801d9@wtt.ditscentre.in/0",
|
||||
debug = True
|
||||
)
|
||||
|
||||
@@ -380,12 +397,12 @@ async def init():
|
||||
cwd = files.get_cwd()
|
||||
parent_dir = cwd
|
||||
ssl_context = get_ssl_context(
|
||||
ca_file = "/etc/ssl/dbu/ca.pem",
|
||||
cert_file = "/etc/ssl/dbu/fullchain.pem",
|
||||
key_file = "/etc/ssl/dbu/privkey.pem"
|
||||
# ca_file = os.path.join(parent_dir, "creds", "kafka", "cert_authority.pem"),
|
||||
# cert_file = os.path.join(parent_dir, "creds", "kafka", "fullchain.pem"),
|
||||
# key_file = os.path.join(parent_dir, "creds", "kafka", "privkey.pem")
|
||||
# ca_file = "/etc/ssl/dbu/ca.pem",
|
||||
# cert_file = "/etc/ssl/dbu/fullchain.pem",
|
||||
# key_file = "/etc/ssl/dbu/privkey.pem"
|
||||
ca_file = os.path.join(parent_dir, "creds", "kafka", "cert_authority.pem"),
|
||||
cert_file = os.path.join(parent_dir, "creds", "kafka", "fullchain.pem"),
|
||||
key_file = os.path.join(parent_dir, "creds", "kafka", "privkey.pem")
|
||||
)
|
||||
sio.start_background_task(
|
||||
ticks_from_kafka,
|
||||
|
||||
Reference in New Issue
Block a user