Another tweak to REPL entry `.pdb()` headers

aio_abandons
Tyler Goodlet 2024-07-05 13:32:03 -04:00
parent e6ccfce751
commit bef3dd9e97
1 changed files with 4 additions and 7 deletions

View File

@ -1552,7 +1552,7 @@ def shield_sigint_handler(
log.devx('exiting SIGINT') log.devx('exiting SIGINT')
_pause_msg: str = 'Attaching to pdb REPL in actor' _pause_msg: str = 'Opening a pdb REPL in paused actor'
class DebugRequestError(RuntimeError): class DebugRequestError(RuntimeError):
@ -2050,9 +2050,8 @@ def _set_trace(
# root here? Bo # root here? Bo
log.pdb( log.pdb(
f'{_pause_msg}\n' f'{_pause_msg}\n'
# '|\n'
f'>(\n' f'>(\n'
f' |_ {task} @ {actor.uid}\n' f'|_ {task} @ {actor.uid}\n'
# ^-TODO-^ more compact pformating? # ^-TODO-^ more compact pformating?
# -[ ] make an `Actor.__repr()__` # -[ ] make an `Actor.__repr()__`
# -[ ] should we use `log.pformat_task_uid()`? # -[ ] should we use `log.pformat_task_uid()`?
@ -2523,7 +2522,7 @@ async def breakpoint(
_crash_msg: str = ( _crash_msg: str = (
'Attaching to pdb REPL in crashed actor' 'Opening a pdb REPL in crashed actor'
) )
@ -2551,11 +2550,9 @@ def _post_mortem(
# here! Bo # here! Bo
log.pdb( log.pdb(
f'{_crash_msg}\n' f'{_crash_msg}\n'
# '|\n'
f'x>(\n' f'x>(\n'
f' |_ {current_task()} @ {actor.uid}\n' f' |_ {current_task()} @ {actor.uid}\n'
# f'|_ @{actor.uid}\n'
# TODO: make an `Actor.__repr()__` # TODO: make an `Actor.__repr()__`
# f'|_ {current_task()} @ {actor.name}\n' # f'|_ {current_task()} @ {actor.name}\n'
) )