mirror of
https://github.com/tahoe-lafs/tahoe-lafs.git
synced 2024-12-24 07:06:41 +00:00
Add logging to get_version().
This commit is contained in:
parent
cf0d3c09f8
commit
64dbeeab8f
@ -480,10 +480,17 @@ class StorageClientGeneral(object):
|
||||
_client: StorageClient
|
||||
|
||||
@async_to_deferred
|
||||
async def get_version(self):
|
||||
async def get_version(self) -> dict[bytes, object]:
|
||||
"""
|
||||
Return the version metadata for the server.
|
||||
"""
|
||||
with start_action(
|
||||
action_type="allmydata:storage:http-client:get-version",
|
||||
):
|
||||
return await self._get_version()
|
||||
|
||||
async def _get_version(self) -> dict[bytes, object]:
|
||||
"""Implementation of get_version()."""
|
||||
url = self._client.relative_url("/storage/v1/version")
|
||||
response = await self._client.request("GET", url)
|
||||
decoded_response = cast(
|
||||
|
Loading…
Reference in New Issue
Block a user