From 150c7c3c98bc2379977af175341dfbcdcf5f2f6f Mon Sep 17 00:00:00 2001 From: kjuulh Date: Sat, 30 Nov 2024 12:16:19 +0100 Subject: [PATCH] feat: setup stream logging Signed-off-by: kjuulh --- crates/churn/src/agent/grpc_client.rs | 4 ++++ upload.sh | 7 +++++++ 2 files changed, 11 insertions(+) create mode 100755 upload.sh diff --git a/crates/churn/src/agent/grpc_client.rs b/crates/churn/src/agent/grpc_client.rs index 234b99b..c988f25 100644 --- a/crates/churn/src/agent/grpc_client.rs +++ b/crates/churn/src/agent/grpc_client.rs @@ -61,6 +61,7 @@ impl GrpcClient { ) -> anyhow::Result<()> { let mut client = self.client().await?; + tracing::debug!("creating stream for listening to events on: {}", namespace); let resp = client .listen_events(ListenEventsRequest { namespace: namespace.into(), @@ -68,8 +69,10 @@ impl GrpcClient { }) .await?; + tracing::debug!("setup stream: {}", namespace); let mut inner = resp.into_inner(); while let Ok(Some(message)) = inner.message().await { + tracing::debug!("received message: {}", namespace); exec.execute(message).await?; } @@ -77,6 +80,7 @@ impl GrpcClient { } async fn client(&self) -> anyhow::Result> { + tracing::debug!("setting up client"); let channel = if self.host.starts_with("https") { Channel::from_shared(self.host.to_owned())? .tls_config(ClientTlsConfig::new().with_native_roots())? diff --git a/upload.sh b/upload.sh new file mode 100755 index 0000000..cc24249 --- /dev/null +++ b/upload.sh @@ -0,0 +1,7 @@ +#!/usr/bin/env zsh + +set -e + +cargo build --release --target x86_64-unknown-linux-musl + +aws s3 cp target/x86_64-unknown-linux-musl/release/churn s3://rust-artifacts/releases/churn/latest/churn --endpoint-url https://api-minio.front.kjuulh.io