From 5d24478710f04b8314833cc709650e4b727c1b2f Mon Sep 17 00:00:00 2001 From: Graham Christensen Date: Wed, 31 Jan 2018 19:38:09 -0500 Subject: [PATCH] Correct the consume queue name, and don't panic on deeserialize errorss --- ofborg/src/bin/github-comment-poster.rs | 2 +- ofborg/src/tasks/githubcommentposter.rs | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/ofborg/src/bin/github-comment-poster.rs b/ofborg/src/bin/github-comment-poster.rs index 1f41e5c..835c5fc 100644 --- a/ofborg/src/bin/github-comment-poster.rs +++ b/ofborg/src/bin/github-comment-poster.rs @@ -67,7 +67,7 @@ fn main() { cfg.github(), )), easyamqp::ConsumeConfig { - queue: "build-inputs".to_owned(), + queue: "build-results".to_owned(), consumer_tag: format!("{}-github-comment-poster", cfg.whoami()), no_local: false, no_ack: false, diff --git a/ofborg/src/tasks/githubcommentposter.rs b/ofborg/src/tasks/githubcommentposter.rs index fddb275..ae93ce0 100644 --- a/ofborg/src/tasks/githubcommentposter.rs +++ b/ofborg/src/tasks/githubcommentposter.rs @@ -31,11 +31,11 @@ impl worker::SimpleWorker for GitHubCommentPoster { return match serde_json::from_slice(body) { Ok(e) => Ok(e), Err(e) => { - println!( - "Failed to deserialize BuildResult: {:?}", - String::from_utf8(body.clone()) - ); - panic!("{:?}", e); + Err(format!( + "Failed to deserialize BuildResult: {:?}, err: {:}", + String::from_utf8_lossy(&body.clone()), + e + )) } }; }