Remove remaining `fqsn` usage from code base minus backward compats
parent
dd10acbbf9
commit
7f246697b4
|
@ -191,7 +191,7 @@ class BrokerdOrder(Struct):
|
|||
account: str
|
||||
time_ns: int
|
||||
|
||||
symbol: str # fqsn
|
||||
symbol: str # fqme
|
||||
price: float
|
||||
size: float
|
||||
|
||||
|
|
|
@ -618,10 +618,10 @@ async def sample_and_broadcast(
|
|||
] = bus.get_subs(sub_key)
|
||||
|
||||
# NOTE: by default the broker backend doesn't append
|
||||
# it's own "name" into the fqsn schema (but maybe it
|
||||
# it's own "name" into the fqme schema (but maybe it
|
||||
# should?) so we have to manually generate the correct
|
||||
# key here.
|
||||
fqsn = f'{broker_symbol}.{brokername}'
|
||||
fqme = f'{broker_symbol}.{brokername}'
|
||||
lags: int = 0
|
||||
|
||||
# TODO: speed up this loop in an AOT compiled lang (like
|
||||
|
@ -640,7 +640,7 @@ async def sample_and_broadcast(
|
|||
# pushes to the ``uniform_rate_send()`` below.
|
||||
try:
|
||||
stream.send_nowait(
|
||||
(fqsn, quote)
|
||||
(fqme, quote)
|
||||
)
|
||||
except trio.WouldBlock:
|
||||
overruns[sub_key] += 1
|
||||
|
@ -672,7 +672,7 @@ async def sample_and_broadcast(
|
|||
raise trio.BrokenResourceError
|
||||
else:
|
||||
await stream.send(
|
||||
{fqsn: quote}
|
||||
{fqme: quote}
|
||||
)
|
||||
|
||||
if cs.cancelled_caught:
|
||||
|
|
|
@ -184,10 +184,10 @@ def storage(
|
|||
symbol = symbols[0]
|
||||
async with open_tsdb_client(symbol) as storage:
|
||||
if delete:
|
||||
for fqsn in symbols:
|
||||
for fqme in symbols:
|
||||
syms = await storage.client.list_symbols()
|
||||
|
||||
resp60s = await storage.delete_ts(fqsn, 60)
|
||||
resp60s = await storage.delete_ts(fqme, 60)
|
||||
|
||||
msgish = resp60s.ListFields()[0][1]
|
||||
if 'error' in str(msgish):
|
||||
|
@ -199,15 +199,15 @@ def storage(
|
|||
# well, if we ever can make this work we
|
||||
# probably want to dogsplain the real reason
|
||||
# for the delete errurz..llululu
|
||||
if fqsn not in syms:
|
||||
log.error(f'Pair {fqsn} dne in DB')
|
||||
if fqme not in syms:
|
||||
log.error(f'Pair {fqme} dne in DB')
|
||||
|
||||
log.error(f'Deletion error: {fqsn}\n{msgish}')
|
||||
log.error(f'Deletion error: {fqme}\n{msgish}')
|
||||
|
||||
resp1s = await storage.delete_ts(fqsn, 1)
|
||||
resp1s = await storage.delete_ts(fqme, 1)
|
||||
msgish = resp1s.ListFields()[0][1]
|
||||
if 'error' in str(msgish):
|
||||
log.error(f'Deletion error: {fqsn}\n{msgish}')
|
||||
log.error(f'Deletion error: {fqme}\n{msgish}')
|
||||
|
||||
trio.run(main)
|
||||
|
||||
|
|
Loading…
Reference in New Issue