Skip to content

Commit

Permalink
add changes
Browse files Browse the repository at this point in the history
  • Loading branch information
jorgeantonio21 committed Apr 15, 2024
1 parent af9d620 commit 1e3ab00
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion atoma-event-subscribe/sui/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,9 @@ async fn main() -> Result<(), SuiSubscriberError> {

let args = Args::parse();
let package_id = ObjectID::from_hex_literal(&args.package_id)?;

let http_url = args.http_addr;
let ws_url = args.ws_socket_addr;

let (event_sender, mut event_receiver) = tokio::sync::mpsc::channel(32);

let event_subscriber =
Expand Down
5 changes: 1 addition & 4 deletions atoma-event-subscribe/sui/src/subscriber.rs
Original file line number Diff line number Diff line change
Expand Up @@ -52,10 +52,7 @@ impl SuiSubscriber {

pub async fn subscribe(self) -> Result<(), SuiSubscriberError> {
let event_api = self.sui_client.event_api();
let mut subscribe_event = event_api.subscribe_event(self.filter).await.map_err(|e| {
error!("Got error: {e}");
e
})?;
let mut subscribe_event = event_api.subscribe_event(self.filter).await?;
info!("Starting event while loop");
while let Some(event) = subscribe_event.next().await {
match event {
Expand Down
5 changes: 4 additions & 1 deletion atoma-node/src/main.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
use std::time::Duration;

use atoma_node::{AtomaNode, AtomaNodeError};
use clap::Parser;
use tokio::sync::mpsc;
Expand Down Expand Up @@ -25,7 +27,7 @@ async fn main() -> Result<(), AtomaNodeError> {

let (_, json_rpc_server_rx) = mpsc::channel(CHANNEL_BUFFER);
tokio::spawn(async move {
let atoma_node = AtomaNode::start(
let _atoma_node = AtomaNode::start(
model_config_path,
private_key_path,
sui_subscriber_path,
Expand All @@ -35,5 +37,6 @@ async fn main() -> Result<(), AtomaNodeError> {
Ok::<(), AtomaNodeError>(())
});

tokio::time::sleep(Duration::from_secs(20)).await;
Ok(())
}

0 comments on commit 1e3ab00

Please sign in to comment.