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
Tyler Goodlet 2021-08-30 17:55:10 -04:00
parent ff322ae7be
commit cae7f486e4
2 changed files with 5 additions and 13 deletions

View File

@ -32,7 +32,7 @@ import tractor
from ..log import get_logger
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 . import _paper_engine as paper
from ._messages import (
@ -958,17 +958,13 @@ async def _emsd_main(
# spawn one task per broker feed
async with (
open_feed(
# maybe_open_feed(
maybe_open_feed(
broker,
[symbol],
loglevel=loglevel,
# ) as (feed, stream),
) as feed,
) as (feed, stream),
):
stream = feed.stream
# XXX: this should be initial price quote from target provider
first_quote = feed.first_quote

View File

@ -177,15 +177,11 @@ async def cascade(
func: Callable = _fsps[fsp_func_name]
# open a data feed stream with requested broker
# async with data.feed.maybe_open_feed(
async with data.feed.open_feed(
async with data.feed.maybe_open_feed(
brokername,
[symbol],
shielded_stream=True,
# ) as (feed, stream):
) as feed:
stream = feed.stream
) as (feed, stream):
assert src.token == feed.shm.token