diff --git a/crates/repo-actor/src/handlers/check_ci_status.rs b/crates/repo-actor/src/handlers/check_ci_status.rs index 264b93d..fc69686 100644 --- a/crates/repo-actor/src/handlers/check_ci_status.rs +++ b/crates/repo-actor/src/handlers/check_ci_status.rs @@ -20,12 +20,12 @@ impl Handler for actor::RepoActor { // get the status - pass, fail, pending (all others map to fail, e.g. error) async move { let status = forge.commit_status(&next).await; - let _ = actor::send( + tracing::debug!("got status: {status:?}"); + actor::do_send( addr, actor::messages::ReceiveCIStatus::new((next, status)), &log, - ) - .await; + ); } .in_current_span() .into_actor(self) diff --git a/crates/repo-actor/src/handlers/validate_repo.rs b/crates/repo-actor/src/handlers/validate_repo.rs index f0de5f6..e085bf7 100644 --- a/crates/repo-actor/src/handlers/validate_repo.rs +++ b/crates/repo-actor/src/handlers/validate_repo.rs @@ -87,12 +87,11 @@ impl Handler for actor::RepoActor { actor::logger(&log, "before sleep"); tokio::time::sleep(sleep_duration).await; actor::logger(&log, "after sleep"); - let _ = actor::send( + actor::do_send( addr, actor::messages::ValidateRepo::new(message_token), &log, - ) - .await; + ); } .in_current_span() .into_actor(self) diff --git a/crates/repo-actor/src/lib.rs b/crates/repo-actor/src/lib.rs index 7f218f5..a06082c 100644 --- a/crates/repo-actor/src/lib.rs +++ b/crates/repo-actor/src/lib.rs @@ -116,21 +116,6 @@ where _addr.do_send(msg) } -pub async fn send( - addr: Addr, - msg: M, - log: &Option, -) -> std::result::Result<::Result, actix::MailboxError> -where - M: actix::Message + Send + 'static + std::fmt::Debug, - RepoActor: actix::Handler, - ::Result: Send, -{ - let log_message = format!("send: {:?}", msg); - logger(log, log_message); - addr.send(msg).await -} - pub fn logger(log: &Option, message: impl Into) { if let Some(log) = log { let message: String = message.into();