Compare commits

...

4 Commits

Author SHA1 Message Date
Tyler Goodlet d767be9bd9 `.tsp._history`: drop `feed_is_live` syncing, another seg flag
The `await feed_is_live.wait()` is more or less pointless and would only
cause slower startup afaig (as-far-as-i-grok) so i'm masking it here.
This also removes the final `strict_exception_groups=False` use from the
non-tests code base, flipping to the `tractor.trionics` collapser once
and for all!
2025-10-02 19:53:08 -04:00
Tyler Goodlet 4e8717262c Woops, keep `np2pl` exposed from `.tsp` 2025-10-02 14:14:28 -04:00
Tyler Goodlet e3d87046f9 accounting.calc: `.error()` on bad txn-time fields..
Since i'm seeing IB records with a `None` value and i don't want to be
debugging every time order-mode boots up..

Also use `pdb=debug_mode` in `.open_ledger_dfs()`
2025-10-02 12:17:57 -04:00
Tyler Goodlet 956b974d6e Factor to a new `.tsp._history` sub-mod
Cleaning out the `piker.tsp` pkg-mod to be only the (re)exports needed
for `._anal`/`._history` refs-use elsewhere!
2025-09-29 16:41:08 -04:00
3 changed files with 1510 additions and 1432 deletions

View File

@ -289,15 +289,26 @@ def iter_by_dt(
else:
continue
# XXX: should never get here..
# XXX: we should never really get here bc it means some kinda
# bad txn-record (field) data..
#
# -> set the `debug_mode = True` if you want to trace such
# cases from REPL ;)
else:
with maybe_open_crash_handler(pdb=True):
raise ValueError(
f'Invalid txn time ??\n'
f'txn-id: {k!r}\n'
f'{k!r}: {v!r}\n'
)
# assert v is not None, f'No valid value for `{k}`!?'
debug_mode: bool = False
report: str = (
f'Invalid txn time ??\n'
f'txn-id: {k!r}\n'
f'{k!r}: {v!r}\n'
)
if debug_mode:
with maybe_open_crash_handler(
pdb=debug_mode,
raise_on_exit=False,
):
raise ValueError(report)
else:
log.error(report)
if _invalid is not None:
_invalid.append(tx)
@ -400,7 +411,10 @@ def open_ledger_dfs(
can update the ledger on exit.
'''
with maybe_open_crash_handler(pdb=debug_mode):
with maybe_open_crash_handler(
pdb=debug_mode,
# raise_on_exit=False,
):
if not ledger:
import time
from ._ledger import open_trade_ledger

File diff suppressed because it is too large Load Diff

1480
piker/tsp/_history.py 100644

File diff suppressed because it is too large Load Diff