Skip to content
This repository has been archived by the owner on Oct 23, 2022. It is now read-only.

Commit

Permalink
Fix: debugging the odd hanging when Redis hicks up
Browse files Browse the repository at this point in the history
  • Loading branch information
eigenein committed Jun 3, 2022
1 parent a2d02d2 commit eab3d4d
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 9 deletions.
10 changes: 4 additions & 6 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion rusty-shared-opts/src/heartbeat.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
use anyhow::Result;
use clap::Parser;
use reqwest::{Client, Url};
use tracing::{debug, instrument, warn};
use tracing::{debug, info, instrument, warn};

#[derive(Parser)]
pub struct Opts {
Expand Down Expand Up @@ -34,6 +34,7 @@ impl Heartbeat {
pub async fn send(&self) {
match &self.endpoint {
Some((client, url)) => {
info!("sending heartbeat…");
if let Err(error) = client.post(url.clone()).send().await {
warn!("heartbeat error: {:#}", error);
}
Expand Down
1 change: 1 addition & 0 deletions rusty-shared-redis/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,7 @@ fn new_configuration(addresses: &[SocketAddr], service_name: String) -> Result<R
}
},
blocking: Blocking::Error,
tracing: true,
..Default::default()
};
Ok(config)
Expand Down
2 changes: 0 additions & 2 deletions rusty-shared-tractive/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,3 @@ chrono = "0.4.19"
fred = { version = "5.0.0", default-features = false }
kv-derive = "1.0.0-rc.9"
serde = "1.0.137"
serde_json = "1.0.79"
serde_with = { version = "1.13.0", features = ["chrono"] }
2 changes: 2 additions & 0 deletions rusty-tractive/src/service.rs
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,7 @@ impl Service {
info!("⌚ timestamp is not updated");
return Ok(());
}
info!("⌚ pushing new entry…");
self.redis
.client
.xadd(
Expand Down Expand Up @@ -154,6 +155,7 @@ impl Service {
info!("🎯 timestamp is not updated");
return Ok(());
}
info!("🎯 pushing new entry…");
self.redis
.client
.xadd(
Expand Down

0 comments on commit eab3d4d

Please sign in to comment.