Cast back to tuples after msgspec strips them...
parent
588b5c317c
commit
3455ebc60c
|
@ -97,8 +97,7 @@ class _Token:
|
||||||
|
|
||||||
def __post_init__(self):
|
def __post_init__(self):
|
||||||
# np.array requires a list for dtype
|
# np.array requires a list for dtype
|
||||||
self.dtype_descr = np.dtype(
|
self.dtype_descr = np.dtype(list(map(tuple, self.dtype_descr))).descr
|
||||||
list(self.dtype_descr)).descr
|
|
||||||
|
|
||||||
def as_msg(self):
|
def as_msg(self):
|
||||||
return asdict(self)
|
return asdict(self)
|
||||||
|
|
|
@ -514,7 +514,10 @@ async def open_feed(
|
||||||
|
|
||||||
# cast shm dtype to list... can't member why we need this
|
# cast shm dtype to list... can't member why we need this
|
||||||
shm_token = data['shm_token']
|
shm_token = data['shm_token']
|
||||||
shm_token['dtype_descr'] = list(shm_token['dtype_descr'])
|
|
||||||
|
# XXX: msgspec won't relay through the tuples XD
|
||||||
|
shm_token['dtype_descr'] = list(map(tuple, shm_token['dtype_descr']))
|
||||||
|
|
||||||
assert shm_token == shm.token # sanity
|
assert shm_token == shm.token # sanity
|
||||||
|
|
||||||
feed._max_sample_rate = max(ohlc_sample_rates)
|
feed._max_sample_rate = max(ohlc_sample_rates)
|
||||||
|
|
Loading…
Reference in New Issue