From 7f246697b4e2ebbe0b5905baf8312d7697fabf77 Mon Sep 17 00:00:00 2001 From: Tyler Goodlet Date: Mon, 22 May 2023 12:24:21 -0400 Subject: [PATCH] Remove remaining `fqsn` usage from code base minus backward compats --- piker/clearing/_messages.py | 2 +- piker/data/_sampling.py | 8 ++++---- piker/data/cli.py | 14 +++++++------- 3 files changed, 12 insertions(+), 12 deletions(-) diff --git a/piker/clearing/_messages.py b/piker/clearing/_messages.py index 61579787..126cd347 100644 --- a/piker/clearing/_messages.py +++ b/piker/clearing/_messages.py @@ -191,7 +191,7 @@ class BrokerdOrder(Struct): account: str time_ns: int - symbol: str # fqsn + symbol: str # fqme price: float size: float diff --git a/piker/data/_sampling.py b/piker/data/_sampling.py index 61ec72cb..20bf9b49 100644 --- a/piker/data/_sampling.py +++ b/piker/data/_sampling.py @@ -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: diff --git a/piker/data/cli.py b/piker/data/cli.py index cee729e5..59db1037 100644 --- a/piker/data/cli.py +++ b/piker/data/cli.py @@ -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)