Port `.clearing` to new `unpack_fqme()`
parent
afdbf8e10a
commit
6f5a2654ab
|
@ -238,7 +238,7 @@ async def open_ems(
|
||||||
broker control client-API.
|
broker control client-API.
|
||||||
|
|
||||||
'''
|
'''
|
||||||
broker, symbol, suffix = unpack_fqme(fqme)
|
broker, mktep, venue, suffix = unpack_fqme(fqme)
|
||||||
|
|
||||||
async with maybe_open_emsd(
|
async with maybe_open_emsd(
|
||||||
broker,
|
broker,
|
||||||
|
|
|
@ -383,7 +383,7 @@ class Router(Struct):
|
||||||
brokermod: ModuleType,
|
brokermod: ModuleType,
|
||||||
portal: tractor.Portal,
|
portal: tractor.Portal,
|
||||||
exec_mode: str,
|
exec_mode: str,
|
||||||
symbol: str,
|
fqme: str,
|
||||||
loglevel: str,
|
loglevel: str,
|
||||||
|
|
||||||
) -> None:
|
) -> None:
|
||||||
|
@ -424,7 +424,7 @@ class Router(Struct):
|
||||||
# actor to simulate the real IPC load it'll have when also
|
# actor to simulate the real IPC load it'll have when also
|
||||||
# pulling data from feeds
|
# pulling data from feeds
|
||||||
open_trades_endpoint = paper.open_paperboi(
|
open_trades_endpoint = paper.open_paperboi(
|
||||||
fqme='.'.join([symbol, broker]),
|
fqme=fqme,
|
||||||
loglevel=loglevel,
|
loglevel=loglevel,
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@ -522,15 +522,13 @@ class Router(Struct):
|
||||||
indefinitely.
|
indefinitely.
|
||||||
|
|
||||||
'''
|
'''
|
||||||
broker, symbol, suffix = unpack_fqme(fqme)
|
|
||||||
|
|
||||||
async with (
|
async with (
|
||||||
maybe_open_feed(
|
maybe_open_feed(
|
||||||
[fqme],
|
[fqme],
|
||||||
loglevel=loglevel,
|
loglevel=loglevel,
|
||||||
) as feed,
|
) as feed,
|
||||||
):
|
):
|
||||||
brokername, _, _ = unpack_fqme(fqme)
|
brokername, _, _, _ = unpack_fqme(fqme)
|
||||||
brokermod = feed.mods[brokername]
|
brokermod = feed.mods[brokername]
|
||||||
broker = brokermod.name
|
broker = brokermod.name
|
||||||
portal = feed.portals[brokermod]
|
portal = feed.portals[brokermod]
|
||||||
|
@ -545,7 +543,7 @@ class Router(Struct):
|
||||||
brokermod=brokermod,
|
brokermod=brokermod,
|
||||||
portal=portal,
|
portal=portal,
|
||||||
exec_mode=exec_mode,
|
exec_mode=exec_mode,
|
||||||
symbol=symbol,
|
fqme=fqme,
|
||||||
loglevel=loglevel,
|
loglevel=loglevel,
|
||||||
) as relay:
|
) as relay:
|
||||||
|
|
||||||
|
@ -1435,7 +1433,7 @@ async def _emsd_main(
|
||||||
global _router
|
global _router
|
||||||
assert _router
|
assert _router
|
||||||
|
|
||||||
broker, symbol, suffix = unpack_fqme(fqme)
|
broker, _, _, _ = unpack_fqme(fqme)
|
||||||
|
|
||||||
# TODO: would be nice if in tractor we can require either a ctx arg,
|
# TODO: would be nice if in tractor we can require either a ctx arg,
|
||||||
# or a named arg with ctx in it and a type annotation of
|
# or a named arg with ctx in it and a type annotation of
|
||||||
|
|
Loading…
Reference in New Issue