diff --git a/ofborg/src/bin/github-comment-filter.rs b/ofborg/src/bin/github-comment-filter.rs index 353b608..bf31ebe 100644 --- a/ofborg/src/bin/github-comment-filter.rs +++ b/ofborg/src/bin/github-comment-filter.rs @@ -16,6 +16,8 @@ use amqp::Table; use ofborg::config; use ofborg::worker; use ofborg::tasks; +use ofborg::easyamqp; +use ofborg::easyamqp::TypedWrappers; fn main() { @@ -25,7 +27,7 @@ fn main() { println!("Hello, world!"); - let mut session = Session::open_url(&cfg.rabbitmq.as_uri()).unwrap(); + let mut session = easyamqp::session_from_config(&cfg.rabbitmq).unwrap(); println!("Connected to rabbitmq"); let mut channel = session.open_channel(1).unwrap(); diff --git a/ofborg/src/bin/log-message-collector.rs b/ofborg/src/bin/log-message-collector.rs index b35e1b6..a831ea9 100644 --- a/ofborg/src/bin/log-message-collector.rs +++ b/ofborg/src/bin/log-message-collector.rs @@ -12,13 +12,15 @@ use ofborg::config; use ofborg::worker; use ofborg::tasks; use amqp::Basic; +use ofborg::easyamqp; +use ofborg::easyamqp::TypedWrappers; + fn main() { let cfg = config::load(env::args().nth(1).unwrap().as_ref()); ofborg::setup_log(); - - let mut session = Session::open_url(&cfg.rabbitmq.as_uri()).unwrap(); + let mut session = easyamqp::session_from_config(&cfg.rabbitmq).unwrap(); println!("Connected to rabbitmq"); let mut channel = session.open_channel(1).unwrap(); diff --git a/ofborg/src/bin/log-message-generator.rs b/ofborg/src/bin/log-message-generator.rs index 97b2337..9eaf6f9 100644 --- a/ofborg/src/bin/log-message-generator.rs +++ b/ofborg/src/bin/log-message-generator.rs @@ -13,6 +13,8 @@ use ofborg::config; use ofborg::notifyworker; use ofborg::tasks::build; use ofborg::message::buildjob; +use ofborg::easyamqp; +use ofborg::easyamqp::TypedWrappers; fn main() { let cfg = config::load(env::args().nth(1).unwrap().as_ref()); diff --git a/ofborg/src/bin/mass-rebuilder.rs b/ofborg/src/bin/mass-rebuilder.rs index d15615f..1b70699 100644 --- a/ofborg/src/bin/mass-rebuilder.rs +++ b/ofborg/src/bin/mass-rebuilder.rs @@ -13,6 +13,8 @@ use ofborg::worker; use amqp::Session; use amqp::Table; use amqp::Basic; +use ofborg::easyamqp; +use ofborg::easyamqp::TypedWrappers; fn main() { let cfg = config::load(env::args().nth(1).unwrap().as_ref());