Skip to content
This repository was archived by the owner on May 27, 2025. It is now read-only.

Commit 3623ae2

Browse files
committed
fix CI
1 parent 04d600a commit 3623ae2

File tree

2 files changed

+18
-14
lines changed

2 files changed

+18
-14
lines changed

src/main.rs

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -183,14 +183,18 @@ async fn main() {
183183
let metrics_clone = metrics.clone();
184184

185185
let mut subscriber = WebsocketSubscriber::new(
186-
uri_clone,
186+
uri_clone.clone(),
187187
listener_clone,
188188
args.subscriber_max_interval,
189189
metrics_clone,
190190
);
191-
191+
192192
let task = tokio::spawn(async move {
193-
info!(message = "starting subscriber", index = index, uri = uri_clone.to_string());
193+
info!(
194+
message = "starting subscriber",
195+
index = index,
196+
uri = uri_clone.to_string()
197+
);
194198
subscriber.run(token_clone).await;
195199
});
196200

src/subscriber.rs

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -65,8 +65,8 @@ where
6565
Err(e) => {
6666
// Added URI to the error log for better debugging
6767
error!(
68-
message = "upstream websocket error",
69-
uri = self.uri.to_string(),
68+
message = "upstream websocket error",
69+
uri = self.uri.to_string(),
7070
error = e.to_string()
7171
);
7272
self.metrics.upstream_errors.increment(1);
@@ -76,14 +76,14 @@ where
7676
if let Some(duration) = self.backoff.next_backoff() {
7777
// Added URI to the warning message
7878
warn!(
79-
message = "reconnecting",
80-
uri = self.uri.to_string(),
79+
message = "reconnecting",
80+
uri = self.uri.to_string(),
8181
seconds = duration.as_secs()
8282
);
8383
select! {
8484
_ = token.cancelled() => {
8585
info!(
86-
message = "cancelled subscriber during backoff",
86+
message = "cancelled subscriber during backoff",
8787
uri = self.uri.to_string()
8888
);
8989
return
@@ -113,7 +113,7 @@ where
113113
// Track successful connections
114114
self.metrics.upstream_connection_successes.increment(1);
115115
connection
116-
},
116+
}
117117
Err(e) => {
118118
// Track failed connections
119119
self.metrics.upstream_connection_failures.increment(1);
@@ -122,7 +122,7 @@ where
122122
};
123123

124124
info!(
125-
message = "websocket connection established",
125+
message = "websocket connection established",
126126
uri = self.uri.to_string()
127127
);
128128

@@ -138,17 +138,17 @@ where
138138
Ok(msg) => {
139139
let text = msg.to_text()?;
140140
trace!(
141-
message = "received message",
142-
uri = self.uri.to_string(),
141+
message = "received message",
142+
uri = self.uri.to_string(),
143143
payload = text
144144
);
145145
self.metrics.upstream_messages.increment(1);
146146
(self.handler)(text.into());
147147
}
148148
Err(e) => {
149149
error!(
150-
message = "error receiving message",
151-
uri = self.uri.to_string(),
150+
message = "error receiving message",
151+
uri = self.uri.to_string(),
152152
error = e.to_string()
153153
);
154154
return Err(e);

0 commit comments

Comments
 (0)