Bump all dependencies

This commit is contained in:
Brian Tarricone 2022-06-08 15:05:17 -07:00
parent c88858e43f
commit a3c2f84223
3 changed files with 363 additions and 469 deletions

820
Cargo.lock generated

File diff suppressed because it is too large Load Diff

View File

@ -6,17 +6,15 @@ edition = "2018"
[dependencies]
chrono = { version = "0.4", features = ["serde"] }
clap = "2.33"
env_logger = "0.9"
futures = "0.3"
influxdb = { version = "0.4", default-features = false, features = ["derive", "use-serde", "h1-client-rustls"] }
influxdb = { version = "0.5", default-features = false, features = ["derive", "use-serde", "h1-client-rustls"] }
jsonpath = "0.1"
lazy_static = "1"
log = { version = "0.4", features = ["std", "serde"] }
regex = "1"
rumqttc = "0.8"
rumqttc = "0.12"
serde = { version = "1", features = ["derive"] }
serde_json = "1"
serde_yaml = "0.8"
tokio = { version = "1", features = ["fs", "io-std", "io-util", "macros", "rt", "rt-multi-thread"] }
tokio-compat-02 = "0.2"

View File

@ -59,9 +59,7 @@ async fn init_mqtt(config: &MqttConfig) -> Result<(MqttAsyncClient, MqttEventLoo
options.set_connection_timeout(connect_timeout.as_secs());
}
if let Some(keep_alive) = config.keep_alive {
let keep_alive_secs = u16::try_from(keep_alive.as_secs())
.map_err(|_| "Keep alive time must be between 0 and 65535".to_string())?;
options.set_keep_alive(keep_alive_secs);
options.set_keep_alive(keep_alive);
}
if let Some(ca_file) = &config.ca_file {
let ca = file_to_bytevec(ca_file).await?;
@ -187,11 +185,9 @@ async fn handle_publish(
query = query.add_tag(&tag.0, value);
}
use tokio_compat_02::FutureExt;
database
.client
.query(&query)
.compat()
.await
.map_err(|err| format!("Failed to write to DB: {}", err))?;
debug!("wrote to influx: {:?}", query);