Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 3 additions & 4 deletions packages/core/pegboard-gateway/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ impl PegboardGateway {
self.shared_state.send_message(request_id, message).await?;

// Wait for response
tracing::info!("starting response handler task");
tracing::debug!("starting response handler task");
let response_start = loop {
let Some(msg) = msg_rx.recv().await else {
tracing::warn!("received no message response");
Expand All @@ -177,7 +177,7 @@ impl PegboardGateway {
}
}
};
tracing::info!("response handler task ended");
tracing::debug!("response handler task ended");

// Build HTTP response
let mut response_builder =
Expand Down Expand Up @@ -300,8 +300,7 @@ impl PegboardGateway {
TunnelMessageData::Message(
protocol::ToServerTunnelMessageKind::ToServerWebSocketClose(close),
) => {
tracing::info!(?close, "server closed websocket");
// Exit the task - websocket will be closed when handle_websocket_inner exits
tracing::debug!(?close, "server closed websocket");
break;
}
TunnelMessageData::Timeout => {
Expand Down
2 changes: 1 addition & 1 deletion packages/core/pegboard-gateway/src/shared_state.rs
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ impl SharedState {

async fn receiver(&self, mut sub: Subscriber) {
while let Ok(NextOutput::Message(msg)) = sub.next().await {
tracing::info!(
tracing::trace!(
payload_len = msg.payload.len(),
"received message from pubsub"
);
Expand Down
8 changes: 4 additions & 4 deletions packages/core/pegboard-runner/src/client_to_pubsub_task.rs
Original file line number Diff line number Diff line change
Expand Up @@ -30,11 +30,11 @@ async fn task_inner(
conn: Arc<Conn>,
mut ws_rx: WebSocketReceiver,
) -> Result<()> {
tracing::info!("starting WebSocket to pubsub forwarding task");
tracing::debug!("starting WebSocket to pubsub forwarding task");
while let Some(msg) = ws_rx.next().await {
match msg {
Result::Ok(WsMessage::Binary(data)) => {
tracing::info!(
tracing::trace!(
data_len = data.len(),
"received binary message from WebSocket"
);
Expand All @@ -60,7 +60,7 @@ async fn task_inner(
.context("failed to handle WebSocket message")?;
}
Result::Ok(WsMessage::Close(_)) => {
tracing::info!(?conn.runner_id, "WebSocket closed");
tracing::debug!(?conn.runner_id, "WebSocket closed");
break;
}
Result::Ok(_) => {
Expand All @@ -72,7 +72,7 @@ async fn task_inner(
}
}
}
tracing::info!("WebSocket to pubsub forwarding task ended");
tracing::debug!("WebSocket to pubsub forwarding task ended");

Ok(())
}
Expand Down
12 changes: 6 additions & 6 deletions packages/core/pegboard-runner/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ impl CustomServeTrait for PegboardRunnerWsCustomServe {
let url_data =
utils::UrlData::parse_url(url).context("failed to extract URL parameters")?;

tracing::info!(?path, "tunnel ws connection established");
tracing::debug!(?path, "tunnel ws connection established");

// Accept WS
let mut ws_rx = ws_handle
Expand All @@ -86,7 +86,7 @@ impl CustomServeTrait for PegboardRunnerWsCustomServe {
// that failures can be retried by the proxy.
let topic =
pegboard::pubsub_subjects::RunnerReceiverSubject::new(conn.runner_id).to_string();
tracing::info!(%topic, "subscribing to runner receiver topic");
tracing::debug!(%topic, "subscribing to runner receiver topic");
let sub = ups
.subscribe(&topic)
.await
Expand All @@ -112,13 +112,13 @@ impl CustomServeTrait for PegboardRunnerWsCustomServe {
// Wait for either task to complete
tokio::select! {
_ = &mut pubsub_to_client => {
tracing::info!("pubsub to WebSocket task completed");
tracing::debug!("pubsub to WebSocket task completed");
}
_ = &mut client_to_pubsub => {
tracing::info!("WebSocket to pubsub task completed");
tracing::debug!("WebSocket to pubsub task completed");
}
_ = &mut ping => {
tracing::info!("ping task completed");
tracing::debug!("ping task completed");
}
}

Expand Down Expand Up @@ -148,7 +148,7 @@ impl CustomServeTrait for PegboardRunnerWsCustomServe {
.ok();

// Clean up
tracing::info!(?conn.runner_id, "connection closed");
tracing::debug!(?conn.runner_id, "connection closed");

Ok(())
}
Expand Down
2 changes: 1 addition & 1 deletion packages/core/pegboard-runner/src/pubsub_to_client_task.rs
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ pub async fn task(ctx: StandaloneCtx, conn: Arc<Conn>, sub: Subscriber) {

async fn task_inner(ctx: StandaloneCtx, conn: Arc<Conn>, mut sub: Subscriber) -> Result<()> {
while let Result::Ok(NextOutput::Message(ups_msg)) = sub.next().await {
tracing::info!(
tracing::debug!(
payload_len = ups_msg.payload.len(),
"received message from pubsub, forwarding to WebSocket"
);
Expand Down
Loading