Skip to content

Commit

Permalink
Merge pull request #3 from Overmuse/SR/update_address
Browse files Browse the repository at this point in the history
only read address from settings
  • Loading branch information
SebRollen authored Jun 21, 2021
2 parents dac0397 + 08467cb commit 3aaeced
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 15 deletions.
22 changes: 11 additions & 11 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "reporting"
version = "0.1.3"
version = "0.1.4"
authors = ["Sebastian Rollen <[email protected]>"]
edition = "2018"

Expand Down
9 changes: 6 additions & 3 deletions src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,12 @@ async fn main() -> Result<()> {
let settings = settings::Settings::new().context("Failed to load settings")?;
let consumer = consumer(&settings.kafka).context("Failed to create kafka consumer")?;
debug!("Creating dogstatsd client");
let client = Client::new("127.0.0.1:0", &settings.app.target_address)
.await
.context("Failed to create dogstatsd client")?;
let client = Client::new(
"127.0.0.1:0",
&format!("{}:8125", settings.app.target_address),
)
.await
.context("Failed to create dogstatsd client")?;
while let Some(message) = consumer.stream().next().await {
let message = message.context("Error from kafka")?;
if let Some(payload) = message.payload() {
Expand Down

0 comments on commit 3aaeced

Please sign in to comment.