diff --git a/Cargo.lock b/Cargo.lock index 56fadc5..65a6eb8 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -5227,7 +5227,7 @@ dependencies = [ [[package]] name = "trident-storage" -version = "0.0.4" +version = "0.0.5" dependencies = [ "anyhow", "async-stream", diff --git a/Cargo.toml b/Cargo.toml index 1446aa1..b2f1cda 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "trident-storage" -version = "0.0.5" +version = "0.0.6" edition = "2021" [lib] diff --git a/src/config.rs b/src/config.rs index a250322..7c9f88e 100644 --- a/src/config.rs +++ b/src/config.rs @@ -72,7 +72,7 @@ pub struct HttpConfig { impl Default for HttpConfig { fn default() -> Self { HttpConfig { - endpoint: "127.0.0.1:80".to_string(), + endpoint: "0.0.0.0:80".to_string(), } } } diff --git a/trident-py/pyproject.toml b/trident-py/pyproject.toml index b7ced39..3ce2b9e 100644 --- a/trident-py/pyproject.toml +++ b/trident-py/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "izihawa-trident-client" -version = "1.0.13" +version = "1.0.14" description = "" authors = ["Pasha Podolsky "] readme = "README.md" diff --git a/trident-py/trident/client.py b/trident-py/trident/client.py index ab29957..64afe36 100644 --- a/trident-py/trident/client.py +++ b/trident-py/trident/client.py @@ -93,9 +93,11 @@ async def table_foreign_insert(self, from_table: str, from_key: str, to_table: s }) return await response.read() - async def table_get(self, table: str, key: str, timeout: float = None) -> bytes: + async def table_get(self, table: str, key: str, timeout: float = None) -> bytes | None: url = f"/tables/{table}/{key}/" response = await self.get(url, timeout=timeout) + if response is None: + return None return await response.read() async def table_get_chunks(self, table: str, key: str, timeout: float = None) -> AsyncGenerator[bytes, None]: