Revert "Lol, don't use `maybe_open_feed()` for now, it's totally borked..."
Think this was fixed by passing through `**kwargs` in
`maybe_open_feed()`, the shielding for fsp respawns wasn't being
properly passed through..
This reverts commit 2f1455d423
.
pause_feeds_on_sym_switch
parent
ff322ae7be
commit
cae7f486e4
|
@ -32,7 +32,7 @@ import tractor
|
||||||
|
|
||||||
from ..log import get_logger
|
from ..log import get_logger
|
||||||
from ..data._normalize import iterticks
|
from ..data._normalize import iterticks
|
||||||
from ..data.feed import Feed, maybe_open_feed, open_feed
|
from ..data.feed import Feed, maybe_open_feed
|
||||||
from .._daemon import maybe_spawn_brokerd
|
from .._daemon import maybe_spawn_brokerd
|
||||||
from . import _paper_engine as paper
|
from . import _paper_engine as paper
|
||||||
from ._messages import (
|
from ._messages import (
|
||||||
|
@ -958,17 +958,13 @@ async def _emsd_main(
|
||||||
|
|
||||||
# spawn one task per broker feed
|
# spawn one task per broker feed
|
||||||
async with (
|
async with (
|
||||||
open_feed(
|
maybe_open_feed(
|
||||||
# maybe_open_feed(
|
|
||||||
broker,
|
broker,
|
||||||
[symbol],
|
[symbol],
|
||||||
loglevel=loglevel,
|
loglevel=loglevel,
|
||||||
# ) as (feed, stream),
|
) as (feed, stream),
|
||||||
) as feed,
|
|
||||||
):
|
):
|
||||||
|
|
||||||
stream = feed.stream
|
|
||||||
|
|
||||||
# XXX: this should be initial price quote from target provider
|
# XXX: this should be initial price quote from target provider
|
||||||
first_quote = feed.first_quote
|
first_quote = feed.first_quote
|
||||||
|
|
||||||
|
|
|
@ -177,15 +177,11 @@ async def cascade(
|
||||||
func: Callable = _fsps[fsp_func_name]
|
func: Callable = _fsps[fsp_func_name]
|
||||||
|
|
||||||
# open a data feed stream with requested broker
|
# open a data feed stream with requested broker
|
||||||
# async with data.feed.maybe_open_feed(
|
async with data.feed.maybe_open_feed(
|
||||||
async with data.feed.open_feed(
|
|
||||||
brokername,
|
brokername,
|
||||||
[symbol],
|
[symbol],
|
||||||
shielded_stream=True,
|
shielded_stream=True,
|
||||||
# ) as (feed, stream):
|
) as (feed, stream):
|
||||||
) as feed:
|
|
||||||
|
|
||||||
stream = feed.stream
|
|
||||||
|
|
||||||
assert src.token == feed.shm.token
|
assert src.token == feed.shm.token
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue