Skip to content

Commit

Permalink
Merge pull request #94 from timfpark/main
Browse files Browse the repository at this point in the history
Update firehose example to latest atrium-api library
  • Loading branch information
sugyan authored Jan 20, 2024
2 parents ce1f4cd + b6ddc9e commit 0978304
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 4 deletions.
2 changes: 1 addition & 1 deletion atrium-xrpc-server/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ edition = "2021"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

[dependencies]
atrium-api = "0.13"
atrium-api = "0.15"
anyhow = "1.0.71"
libipld-core = { version = "0.16.0", features = ["serde-codec"] }
serde_ipld_dagcbor = "0.3.0"
4 changes: 2 additions & 2 deletions examples/firehose/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@ edition = "2021"

[dependencies]
atrium-xrpc-server = { path = "../../atrium-xrpc-server" }
atrium-api = "0.13"
atrium-api = "0.15"
ciborium = "0.2.1"
futures = "0.3.28"
rs-car = "0.4.1"
tokio = { version = "1.28.1", features = ["full"] }
tokio-tungstenite = { version = "0.18.0", features = ["native-tls"] }
tokio-tungstenite = { version = "0.21.0", features = ["native-tls"] }
9 changes: 8 additions & 1 deletion examples/firehose/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,15 @@ async fn process_message(message: &[u8]) -> Result<(), Box<dyn std::error::Error
{
println!("{}: {}", value.created_at, value.text);
} else {
// TODO
println!("FAILED: could not deserialize post from item of length: {}", item.len());

}
} else {
println!(
"FAILED: could not find item with operation cid {:?} out of {} items",
op.cid,
items.len()
);
}
}
}
Expand Down

0 comments on commit 0978304

Please sign in to comment.