Partial conversion to a typed wrappper
This commit is contained in:
parent
634f2bb51f
commit
8ff9fa9638
|
@ -16,6 +16,8 @@ use amqp::Table;
|
||||||
use ofborg::config;
|
use ofborg::config;
|
||||||
use ofborg::worker;
|
use ofborg::worker;
|
||||||
use ofborg::tasks;
|
use ofborg::tasks;
|
||||||
|
use ofborg::easyamqp;
|
||||||
|
use ofborg::easyamqp::TypedWrappers;
|
||||||
|
|
||||||
|
|
||||||
fn main() {
|
fn main() {
|
||||||
|
@ -25,7 +27,7 @@ fn main() {
|
||||||
println!("Hello, world!");
|
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");
|
println!("Connected to rabbitmq");
|
||||||
|
|
||||||
let mut channel = session.open_channel(1).unwrap();
|
let mut channel = session.open_channel(1).unwrap();
|
||||||
|
|
|
@ -12,13 +12,15 @@ use ofborg::config;
|
||||||
use ofborg::worker;
|
use ofborg::worker;
|
||||||
use ofborg::tasks;
|
use ofborg::tasks;
|
||||||
use amqp::Basic;
|
use amqp::Basic;
|
||||||
|
use ofborg::easyamqp;
|
||||||
|
use ofborg::easyamqp::TypedWrappers;
|
||||||
|
|
||||||
|
|
||||||
fn main() {
|
fn main() {
|
||||||
let cfg = config::load(env::args().nth(1).unwrap().as_ref());
|
let cfg = config::load(env::args().nth(1).unwrap().as_ref());
|
||||||
ofborg::setup_log();
|
ofborg::setup_log();
|
||||||
|
|
||||||
|
let mut session = easyamqp::session_from_config(&cfg.rabbitmq).unwrap();
|
||||||
let mut session = Session::open_url(&cfg.rabbitmq.as_uri()).unwrap();
|
|
||||||
println!("Connected to rabbitmq");
|
println!("Connected to rabbitmq");
|
||||||
|
|
||||||
let mut channel = session.open_channel(1).unwrap();
|
let mut channel = session.open_channel(1).unwrap();
|
||||||
|
|
|
@ -13,6 +13,8 @@ use ofborg::config;
|
||||||
use ofborg::notifyworker;
|
use ofborg::notifyworker;
|
||||||
use ofborg::tasks::build;
|
use ofborg::tasks::build;
|
||||||
use ofborg::message::buildjob;
|
use ofborg::message::buildjob;
|
||||||
|
use ofborg::easyamqp;
|
||||||
|
use ofborg::easyamqp::TypedWrappers;
|
||||||
|
|
||||||
fn main() {
|
fn main() {
|
||||||
let cfg = config::load(env::args().nth(1).unwrap().as_ref());
|
let cfg = config::load(env::args().nth(1).unwrap().as_ref());
|
||||||
|
|
|
@ -13,6 +13,8 @@ use ofborg::worker;
|
||||||
use amqp::Session;
|
use amqp::Session;
|
||||||
use amqp::Table;
|
use amqp::Table;
|
||||||
use amqp::Basic;
|
use amqp::Basic;
|
||||||
|
use ofborg::easyamqp;
|
||||||
|
use ofborg::easyamqp::TypedWrappers;
|
||||||
|
|
||||||
fn main() {
|
fn main() {
|
||||||
let cfg = config::load(env::args().nth(1).unwrap().as_ref());
|
let cfg = config::load(env::args().nth(1).unwrap().as_ref());
|
||||||
|
|
Loading…
Reference in a new issue