Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: jupyter-server/pycrdt-websocket
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v0.15.0
Choose a base ref
...
head repository: jupyter-server/pycrdt-websocket
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: b43acfd307f4af68efc6bc460e9e597748cdf59e
Choose a head ref
  • 1 commit
  • 2 files changed
  • 3 contributors

Commits on Oct 14, 2024

  1. Start the server awareness (#78)

    * Start the server awareness
    
    * Stop the awareness
    
    * Apply suggestions from review
    
    Co-authored-by: David Brochart <[email protected]>
    
    * Stop awareness on error
    
    ---------
    
    Co-authored-by: David Brochart <[email protected]>
    Co-authored-by: David Brochart <[email protected]>
    3 people authored Oct 14, 2024
    Copy the full SHA
    b43acfd View commit details
Showing with 5 additions and 1 deletion.
  1. +4 −0 pycrdt_websocket/yroom.py
  2. +1 −1 pyproject.toml
4 changes: 4 additions & 0 deletions pycrdt_websocket/yroom.py
Original file line number Diff line number Diff line change
@@ -213,6 +213,7 @@ async def start(
self._task_group.start_soon(self._stopped.wait)
self._task_group.start_soon(self._watch_ready)
self._task_group.start_soon(self._broadcast_updates)
self._task_group.start_soon(self.awareness.start)
return

async with self._start_lock:
@@ -231,15 +232,18 @@ async def start(
self._task_group.start_soon(self._stopped.wait)
self._task_group.start_soon(self._watch_ready)
self._task_group.start_soon(self._broadcast_updates)
self._task_group.start_soon(self.awareness.start)
return
except Exception as exception:
await self.awareness.stop()
self._handle_exception(exception)

async def stop(self) -> None:
"""Stop the room."""
if self._task_group is None:
raise RuntimeError("YRoom not running")
self._stopped.set()
await self.awareness.stop()
self._task_group.cancel_scope.cancel()
self._task_group = None
if self._subscription is not None:
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -30,7 +30,7 @@ classifiers = [
dependencies = [
"anyio >=3.6.2,<5",
"sqlite-anyio >=0.2.3,<0.3.0",
"pycrdt >=0.10.1,<0.11.0",
"pycrdt >=0.10.3,<0.11.0",
]

[project.optional-dependencies]