bin/stats: use whoami() to identify rabbitmq

This commit is contained in:
Cole Helbling 2022-03-05 12:35:52 -08:00
parent 3d7a81300b
commit f1258f77ab

View file

@ -18,10 +18,7 @@ fn main() -> Result<(), Box<dyn Error>> {
let conn = easylapin::from_config(&cfg.rabbitmq)?;
let mut chan = task::block_on(conn.create_channel())?;
let events = stats::RabbitMq::from_lapin(
&format!("{}-{}", cfg.runner.identity, cfg.nix.system),
task::block_on(conn.create_channel())?,
);
let events = stats::RabbitMq::from_lapin(&cfg.whoami(), task::block_on(conn.create_channel())?);
let metrics = stats::MetricCollector::new();
let collector = tasks::statscollector::StatCollectorWorker::new(events, metrics.clone());