Update debug levels

This commit is contained in:
asonix 2020-03-19 20:11:50 -05:00
parent eefff20941
commit e8744b23c5
3 changed files with 9 additions and 10 deletions

4
Cargo.lock generated
View file

@ -1122,9 +1122,9 @@ dependencies = [
[[package]] [[package]]
name = "http-signature-normalization-actix" name = "http-signature-normalization-actix"
version = "0.3.0-alpha.5" version = "0.3.0-alpha.6"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "2ef97fd4d560efcc886defdd46b44ac9dbaa6000c467bf0a6a63592a5373a468" checksum = "da5b8165a06ced6083c67a62538a48a0d7e952d66c35f6bd0da2f6c35a4689ff"
dependencies = [ dependencies = [
"actix-http", "actix-http",
"actix-web", "actix-web",

View file

@ -18,7 +18,7 @@ bb8-postgres = "0.4.0"
config = "0.10.1" config = "0.10.1"
dotenv = "0.15.0" dotenv = "0.15.0"
futures = "0.3.4" futures = "0.3.4"
http-signature-normalization-actix = { version = "0.3.0-alpha.5", default-features = false, features = ["sha-2"] } http-signature-normalization-actix = { version = "0.3.0-alpha.6", default-features = false, features = ["sha-2"] }
log = "0.4" log = "0.4"
lru = "0.4.3" lru = "0.4.3"
num_cpus = "1.12" num_cpus = "1.12"

View file

@ -119,34 +119,33 @@ impl StreamHandler<Notify> for NotifyHandler {
fn handle(&mut self, Notify(notif): Notify, ctx: &mut Self::Context) { fn handle(&mut self, Notify(notif): Notify, ctx: &mut Self::Context) {
let state = self.state.clone(); let state = self.state.clone();
info!("Handling notification in {}", notif.channel());
let fut = async move { let fut = async move {
match notif.channel() { match notif.channel() {
"new_blocks" => { "new_blocks" => {
debug!("Caching block of {}", notif.payload()); info!("Caching block of {}", notif.payload());
state.cache_block(notif.payload().to_owned()).await; state.cache_block(notif.payload().to_owned()).await;
} }
"new_whitelists" => { "new_whitelists" => {
debug!("Caching whitelist of {}", notif.payload()); info!("Caching whitelist of {}", notif.payload());
state.cache_whitelist(notif.payload().to_owned()).await; state.cache_whitelist(notif.payload().to_owned()).await;
} }
"new_listeners" => { "new_listeners" => {
if let Ok(uri) = notif.payload().parse::<XsdAnyUri>() { if let Ok(uri) = notif.payload().parse::<XsdAnyUri>() {
debug!("Caching listener {}", uri); info!("Caching listener {}", uri);
state.cache_listener(uri).await; state.cache_listener(uri).await;
} }
} }
"rm_blocks" => { "rm_blocks" => {
debug!("Busting block cache for {}", notif.payload()); info!("Busting block cache for {}", notif.payload());
state.bust_block(notif.payload()).await; state.bust_block(notif.payload()).await;
} }
"rm_whitelists" => { "rm_whitelists" => {
debug!("Busting whitelist cache for {}", notif.payload()); info!("Busting whitelist cache for {}", notif.payload());
state.bust_whitelist(notif.payload()).await; state.bust_whitelist(notif.payload()).await;
} }
"rm_listeners" => { "rm_listeners" => {
if let Ok(uri) = notif.payload().parse::<XsdAnyUri>() { if let Ok(uri) = notif.payload().parse::<XsdAnyUri>() {
debug!("Busting listener cache for {}", uri); info!("Busting listener cache for {}", uri);
state.bust_listener(&uri).await; state.bust_listener(&uri).await;
} }
} }