Don't expect `conf.toml`'s network section
For testing this is particularly true until we offer a template with whatever (likely localhost) settings planned to ship.master
parent
e4e4cacef3
commit
660a94d610
|
@ -325,8 +325,19 @@ async def start_backfill(
|
|||
f'Writing {ln} frame to storage:\n'
|
||||
f'{start_dt} -> {end_dt}'
|
||||
)
|
||||
|
||||
if mkt.dst.atype != 'crypto':
|
||||
# for now, our table key schema is not including
|
||||
# the dst[/src] source asset token.
|
||||
col_sym_key: str = mkt.get_fqme(
|
||||
delim_char='',
|
||||
without_src=True,
|
||||
)
|
||||
else:
|
||||
col_sym_key: str = mkt.get_fqme(delim_char='')
|
||||
|
||||
await storage.write_ohlcv(
|
||||
f'{mkt.fqme}',
|
||||
col_sym_key,
|
||||
to_push,
|
||||
timeframe,
|
||||
)
|
||||
|
@ -632,7 +643,7 @@ async def manage_history(
|
|||
name, uuid = uid
|
||||
service = name.rstrip(f'.{mod.name}')
|
||||
|
||||
fqme: str = mkt.fqme
|
||||
fqme: str = mkt.get_fqme(delim_char='')
|
||||
|
||||
# (maybe) allocate shm array for this broker/symbol which will
|
||||
# be used for fast near-term history capture and processing.
|
||||
|
@ -701,8 +712,13 @@ async def manage_history(
|
|||
)
|
||||
assert open_history_client
|
||||
|
||||
conf, path = config.load('conf')
|
||||
tsdbconf = conf['network'].get('tsdb')
|
||||
tsdb_is_up: bool = False
|
||||
try_remote_tsdb: bool = False
|
||||
|
||||
conf, path = config.load('conf', touch_if_dne=True)
|
||||
net = conf.get('network')
|
||||
if net:
|
||||
tsdbconf = net.get('tsdb')
|
||||
|
||||
# lookup backend tsdb module by name and load any user service
|
||||
# settings for connecting to the tsdb service.
|
||||
|
@ -712,12 +728,10 @@ async def manage_history(
|
|||
# TODO: import and load storagemod by name
|
||||
# mod = get_storagemod(tsdb_backend)
|
||||
from ..service import marketstore
|
||||
|
||||
tsdb_is_up: bool = False
|
||||
try_remote_tsdb: bool = False
|
||||
if tsdb_host == 'localhost':
|
||||
log.info('Scanning for existing `{tsbd_backend}`')
|
||||
tsdb_is_up: bool = await check_for_service(f'{tsdb_backend}d')
|
||||
|
||||
else:
|
||||
try_remote_tsdb: bool = True
|
||||
|
||||
|
|
Loading…
Reference in New Issue