Skip to content

Commit

Permalink
_build_snapshot and prune_all_connections
Browse files Browse the repository at this point in the history
  • Loading branch information
mmastrac committed Jul 19, 2024
1 parent a1bfe2f commit f10926e
Showing 1 changed file with 15 additions and 2 deletions.
17 changes: 15 additions & 2 deletions edb/server/connpool/pool2.py
Original file line number Diff line number Diff line change
Expand Up @@ -213,15 +213,28 @@ async def prune_inactive_connections(self, dbname: str) -> None:
await self._prunes[id]
del self._prunes[id]

async def prune_all_connections(self) -> None:
pass

def get_pending_conns(self) -> int:
return 0

def iterate_connections(self) -> typing.Iterator[C]:
for conn in self._conns.values():
yield conn

def _build_snapshot(self, *, now: float) -> None:
pass
def _build_snapshot(self, *, now: float) -> Snapshot:
return Snapshot(
timestamp=now,
blocks=[],
capacity=self._cur_capacity,
log=[],

failed_connects=self._failed_connects,
failed_disconnects=self._failed_disconnects,
successful_connects=self._successful_connects,
successful_disconnects=self._successful_disconnects,
)

@property
def max_capacity(self) -> int:
Expand Down

0 comments on commit f10926e

Please sign in to comment.