From 5ec756234aaf12c5ebcb05e41d8e917068f90043 Mon Sep 17 00:00:00 2001 From: Tyler Goodlet Date: Wed, 14 Aug 2024 17:59:09 -0400 Subject: [PATCH] Mask no-data pause-point, add perps to sig. Was orig for debugging an issue with `kucoin` i think but definitely shouldn't be left in XD Also add `'perpetual_future'` to `start_backfill()` input literal set. --- piker/tsp/__init__.py | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/piker/tsp/__init__.py b/piker/tsp/__init__.py index adbe484e..7e0b4953 100644 --- a/piker/tsp/__init__.py +++ b/piker/tsp/__init__.py @@ -458,13 +458,15 @@ async def start_backfill( 'bf_until <- last_start_dt:\n' f'{backfill_until_dt} <- {last_start_dt}\n' ) - - # ugh, what's a better way? - # TODO: fwiw, we probably want a way to signal a throttle - # condition (eg. with ib) so that we can halt the - # request loop until the condition is resolved? - if timeframe > 1: - await tractor.pause() + # UGH: what's a better way? + # TODO: backends are responsible for being correct on + # this right!? + # -[ ] in the `ib` case we could maybe offer some way + # to halt the request loop until the condition is + # resolved or should the backend be entirely in + # charge of solving such faults? yes, right? + # if timeframe > 1: + # await tractor.pause() return assert ( @@ -578,6 +580,7 @@ async def start_backfill( 'crypto', 'crypto_currency', 'fiat', # a "forex pair" + 'perpetual_future', # stupid "perps" from cex land }: # for now, our table key schema is not including # the dst[/src] source asset token.