Skip to content

Commit

Permalink
feat: Development
Browse files Browse the repository at this point in the history
  • Loading branch information
ppodolsky committed Feb 18, 2024
1 parent 6a12829 commit 68ec070
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 6 deletions.
5 changes: 3 additions & 2 deletions bin/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -71,9 +71,10 @@ struct TablesCreateRequest {
#[derive(Deserialize)]
struct TablesImportRequest {
ticket: String,
download_policy: Option<DownloadPolicy>,
storage: String,
#[serde(default)]
download_policy: Option<DownloadPolicy>,
#[serde(default)]
sinks: Vec<String>,
#[serde(default = "return_true")]
keep_blob: bool,
Expand Down Expand Up @@ -311,10 +312,10 @@ async fn tables_import(
.tables_import(
&table,
&tables_import_request.ticket,
&tables_import_request.storage,
tables_import_request
.download_policy
.unwrap_or_else(|| DownloadPolicy::EverythingExcept(vec![])),
&tables_import_request.storage,
tables_import_request.sinks,
tables_import_request.keep_blob,
)
Expand Down
2 changes: 1 addition & 1 deletion src/iroh_node.rs
Original file line number Diff line number Diff line change
Expand Up @@ -257,8 +257,8 @@ impl IrohNode {
&mut self,
table_name: &str,
table_ticket: &str,
download_policy: DownloadPolicy,
storage_name: &str,
download_policy: DownloadPolicy,
sinks: Vec<String>,
keep_blob: bool,
) -> Result<NamespaceId> {
Expand Down
2 changes: 1 addition & 1 deletion trident-py/pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "izihawa-trident-client"
version = "1.0.11"
version = "1.0.12"
description = ""
authors = ["Pasha Podolsky <[email protected]>"]
readme = "README.md"
Expand Down
4 changes: 2 additions & 2 deletions trident-py/trident/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,8 @@ async def tables_import(
self,
table: str,
ticket: str,
storage: str,
download_policy: dict | None = None,
storage: str = "default",
sinks: tuple | list = tuple(),
keep_blob: bool = True,
) -> bytes:
Expand All @@ -48,8 +48,8 @@ async def tables_import(
url,
json={
'ticket': ticket,
'download_policy': download_policy,
'storage': storage,
'download_policy': download_policy,
'sinks': sinks,
'keep_blob': keep_blob,
},
Expand Down

0 comments on commit 68ec070

Please sign in to comment.