From bd243dcf70713e743cbebafa5db2b80f9e9e3f37 Mon Sep 17 00:00:00 2001 From: jorgeantonio21 Date: Mon, 6 May 2024 11:19:48 +0100 Subject: [PATCH 1/2] first commit --- atoma-event-subscribe/sui/src/subscriber.rs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/atoma-event-subscribe/sui/src/subscriber.rs b/atoma-event-subscribe/sui/src/subscriber.rs index 0ee4bc1b..7ff59f5b 100644 --- a/atoma-event-subscribe/sui/src/subscriber.rs +++ b/atoma-event-subscribe/sui/src/subscriber.rs @@ -89,7 +89,10 @@ impl SuiSubscriber { async fn handle_event(&self, event: SuiEvent) -> Result<(), SuiSubscriberError> { match event.type_.name.as_str() { "DisputeEvent" => todo!(), - "FirstSubmissionEvent" | "NodeRegisteredEvent" | "NodeSubscribedToModelEvent" => {} + "FirstSubmissionEvent" + | "NodeRegisteredEvent" + | "NodeSubscribedToModelEvent" + | "SettledEvent" => {} "Text2TextPromptEvent" | "NewlySampledNodesEvent" => { let event_data = event.parsed_json; self.handle_text2text_prompt_event(event_data).await?; From 11ab32bbb1da315c5c43c7f44907d4533a2df497 Mon Sep 17 00:00:00 2001 From: jorgeantonio21 Date: Mon, 6 May 2024 11:21:48 +0100 Subject: [PATCH 2/2] add logging --- atoma-event-subscribe/sui/src/subscriber.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/atoma-event-subscribe/sui/src/subscriber.rs b/atoma-event-subscribe/sui/src/subscriber.rs index 7ff59f5b..86f52aff 100644 --- a/atoma-event-subscribe/sui/src/subscriber.rs +++ b/atoma-event-subscribe/sui/src/subscriber.rs @@ -92,7 +92,9 @@ impl SuiSubscriber { "FirstSubmissionEvent" | "NodeRegisteredEvent" | "NodeSubscribedToModelEvent" - | "SettledEvent" => {} + | "SettledEvent" => { + info!("Received event: {}", event.type_.name.as_str()); + } "Text2TextPromptEvent" | "NewlySampledNodesEvent" => { let event_data = event.parsed_json; self.handle_text2text_prompt_event(event_data).await?;