(20241226) With new bash scripts for SocketIO.
This commit is contained in:
@@ -57,6 +57,7 @@ from models.finstitutions.trading.symbols import TradingSymbol
|
||||
from models.finstitutions.trading.ticks import TradingTick
|
||||
|
||||
# To work with SocketIO:
|
||||
import socket
|
||||
import socketio
|
||||
|
||||
# For asynchronous activities:
|
||||
@@ -80,6 +81,9 @@ from icecream import IceCreamDebugger
|
||||
printer = IceCreamDebugger(prefix = "Tick-Disp, | ", includeContext = True)
|
||||
printer.disable()
|
||||
|
||||
# General:
|
||||
SERVER_HOSTNAME = str(socket.gethostname())
|
||||
|
||||
# For SocketIO:
|
||||
sio = socketio.AsyncServer(async_mode = "asgi")
|
||||
app = socketio.ASGIApp(sio)
|
||||
@@ -238,6 +242,7 @@ async def init():
|
||||
ticks_from_kafka,
|
||||
consumer = ConsumerKafka(
|
||||
topic = "tickers",
|
||||
group_id = f"{SERVER_HOSTNAME}_tickers",
|
||||
bootstrap_servers = "del.ditscentre.in:9092",
|
||||
security_protocol = "SSL",
|
||||
ssl_context = get_ssl_context(
|
||||
|
||||
Reference in New Issue
Block a user