fix monitor client

This commit is contained in:
mbecker20
2023-01-10 09:38:05 +00:00
parent 00bae80410
commit 41d86e1f34
5 changed files with 7 additions and 7 deletions

4
Cargo.lock generated
View File

@@ -2435,9 +2435,9 @@ checksum = "cda74da7e1a664f795bb1f8a87ec406fb89a02522cf6e50620d016add6dbbf5c"
[[package]]
name = "tokio"
version = "1.23.0"
version = "1.24.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "eab6d665857cc6ca78d6e80303a02cea7a7851e85dfbd77cbdc09bd129f1ef46"
checksum = "1d9f76183f91ecfb55e1d7d5602bd1d979e38a3a522fe900241cf195624d67ae"
dependencies = [
"autocfg",
"bytes",

View File

@@ -13,7 +13,7 @@ types = { package = "monitor_types", version = "0.1.2" }
db = { package = "db_client", path = "../lib/db_client" }
periphery = { package = "periphery_client", path = "../lib/periphery_client" }
axum_oauth2 = { path = "../lib/axum_oauth2" }
tokio = { version = "1.21", features = ["full"] }
tokio = { version = "1.24", features = ["full"] }
tokio-tungstenite = { version = "0.18", features=["native-tls"] }
tokio-util = "0.7"
axum = { version = "0.6", features = ["ws", "json"] }

View File

@@ -13,7 +13,7 @@ monitor_types = "0.1.2"
# monitor_types = { path = "../types" }
reqwest = { version = "0.11", features = ["json"] }
tokio-tungstenite = { version = "0.18", features=["native-tls"] }
tokio = "1.23"
tokio = { version = "1.24", features = ["full"] }
tokio-util = "0.7"
anyhow = "1.0"
serde = "1.0"

View File

@@ -7,7 +7,7 @@ use monitor_types::{
use serde_json::{json, Value};
use tokio::{
sync::broadcast::{self, Receiver},
task::JoinHandle,
task::JoinHandle, select,
};
use tokio_tungstenite::{connect_async, tungstenite::Message};
use tokio_util::sync::CancellationToken;
@@ -152,7 +152,7 @@ impl MonitorClient {
let (sender, receiver) = broadcast::channel(100);
let handle = tokio::spawn(async move {
loop {
let stats = tokio::select! {
let stats = select! {
_ = cancel_clone.cancelled() => {
let _ = socket.close(None).await;
break;

View File

@@ -19,7 +19,7 @@ helpers = { package = "monitor_helpers", version = "0.1.1" }
types = { package = "monitor_types", version = "0.1.2" }
run_command = { version = "0.0.5", features = ["async_tokio"] }
async_timing_util = "0.1.12"
tokio = { version = "1.23", features = ["full"] }
tokio = { version = "1.24", features = ["full"] }
axum = { version = "0.6", features = ["ws"] }
tower = { version = "0.4", features = ["full"] }
dotenv = "0.15"