Enable daemon debug through top level kwarg
parent
aaca2b2f33
commit
e1dc2b9225
|
@ -91,7 +91,7 @@ async def maybe_spawn_brokerd(
|
||||||
|
|
||||||
# XXX: you should pretty much never want debug mode
|
# XXX: you should pretty much never want debug mode
|
||||||
# for data daemons when running in production.
|
# for data daemons when running in production.
|
||||||
debug_mode: bool = False,
|
debug_mode: bool = True,
|
||||||
) -> tractor._portal.Portal:
|
) -> tractor._portal.Portal:
|
||||||
"""If no ``brokerd.{brokername}`` daemon-actor can be found,
|
"""If no ``brokerd.{brokername}`` daemon-actor can be found,
|
||||||
spawn one in a local subactor and return a portal to it.
|
spawn one in a local subactor and return a portal to it.
|
||||||
|
@ -115,7 +115,7 @@ async def maybe_spawn_brokerd(
|
||||||
tractor_kwargs = getattr(brokermod, '_spawn_kwargs', {})
|
tractor_kwargs = getattr(brokermod, '_spawn_kwargs', {})
|
||||||
|
|
||||||
async with tractor.open_nursery(
|
async with tractor.open_nursery(
|
||||||
debug_mode=False,
|
#debug_mode=debug_mode,
|
||||||
) as nursery:
|
) as nursery:
|
||||||
try:
|
try:
|
||||||
# spawn new daemon
|
# spawn new daemon
|
||||||
|
@ -244,7 +244,7 @@ async def open_feed(
|
||||||
loglevel=loglevel,
|
loglevel=loglevel,
|
||||||
|
|
||||||
# TODO: add a cli flag for this
|
# TODO: add a cli flag for this
|
||||||
debug_mode=False,
|
# debug_mode=False,
|
||||||
|
|
||||||
) as portal:
|
) as portal:
|
||||||
|
|
||||||
|
|
|
@ -408,7 +408,7 @@ class ChartPlotWidget(pg.PlotWidget):
|
||||||
self.name = name
|
self.name = name
|
||||||
self._lc = linked_charts
|
self._lc = linked_charts
|
||||||
|
|
||||||
# view-local placeholder for book graphics
|
# scene-local placeholder for book graphics
|
||||||
# sizing to avoid overlap with data contents
|
# sizing to avoid overlap with data contents
|
||||||
self._max_l1_line_len: float = 0
|
self._max_l1_line_len: float = 0
|
||||||
|
|
||||||
|
@ -448,7 +448,7 @@ class ChartPlotWidget(pg.PlotWidget):
|
||||||
# for when the splitter(s) are resized
|
# for when the splitter(s) are resized
|
||||||
self._vb.sigResized.connect(self._set_yrange)
|
self._vb.sigResized.connect(self._set_yrange)
|
||||||
|
|
||||||
def last_bar_in_view(self) -> bool:
|
def last_bar_in_view(self) -> int:
|
||||||
self._ohlc[-1]['index']
|
self._ohlc[-1]['index']
|
||||||
|
|
||||||
def update_contents_labels(
|
def update_contents_labels(
|
||||||
|
|
|
@ -181,10 +181,13 @@ class OrderMode:
|
||||||
log.runtime(result)
|
log.runtime(result)
|
||||||
|
|
||||||
def on_cancel(self, uuid: str) -> None:
|
def on_cancel(self, uuid: str) -> None:
|
||||||
|
|
||||||
msg = self.book._sent_orders.pop(uuid, None)
|
msg = self.book._sent_orders.pop(uuid, None)
|
||||||
|
|
||||||
if msg is not None:
|
if msg is not None:
|
||||||
self.lines.remove_line(uuid=uuid)
|
self.lines.remove_line(uuid=uuid)
|
||||||
self.chart._cursor.show_xhair()
|
self.chart._cursor.show_xhair()
|
||||||
|
|
||||||
else:
|
else:
|
||||||
log.warning(
|
log.warning(
|
||||||
f'Received cancel for unsubmitted order {pformat(msg)}'
|
f'Received cancel for unsubmitted order {pformat(msg)}'
|
||||||
|
|
Loading…
Reference in New Issue