Skip to content

Commit

Permalink
Add more debugging statements
Browse files Browse the repository at this point in the history
  • Loading branch information
karangattu committed Mar 22, 2024
1 parent b59d589 commit 3d627e4
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
3 changes: 3 additions & 0 deletions shiny/session/_session.py
Original file line number Diff line number Diff line change
Expand Up @@ -242,7 +242,9 @@ async def _run_session_end_tasks(self) -> None:
self._has_run_session_end_tasks = True

try:
print(f"Invoking {self._on_ended_callbacks.count()} on ended callbacks")
await self._on_ended_callbacks.invoke()
print("After invoking on ended callbacks")
finally:
self.app._remove_session(self)

Expand Down Expand Up @@ -773,6 +775,7 @@ def on_ended(
:
A function that can be used to cancel the registration.
"""
print("adding on_ended callback")
return self._on_ended_callbacks.register(wrap_async(fn))

# ==========================================================================
Expand Down
1 change: 1 addition & 0 deletions tests/playwright/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,7 @@ def __init__(self, proc: subprocess.Popen[str], port: int):

def _run(self) -> None:
self.proc.wait()
sleep(0.5)
if self.proc.stdout is not None:
self.proc.stdout.close()
if self.proc.stderr is not None:
Expand Down

0 comments on commit 3d627e4

Please sign in to comment.