Skip to content
This repository has been archived by the owner on Nov 24, 2021. It is now read-only.

Commit

Permalink
Merge pull request #45 from runabove/ns
Browse files Browse the repository at this point in the history
fix: sink files are not processed
  • Loading branch information
d33d33 authored Aug 7, 2017
2 parents abe8d99 + 5084901 commit a354140
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
2 changes: 1 addition & 1 deletion 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 = "beamium"
version = "1.6.4"
version = "1.6.5"
authors = [ "d33d33 <kevin.georges@corp.ovh.com>" ]

build = "build.rs"
Expand Down
5 changes: 3 additions & 2 deletions src/router.rs
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,8 @@ fn route(sinks: &Vec<config::Sink>,
-> Result<usize, Box<Error>> {
let mut proc_size = 0;
let mut batch_count = 0;
let start = time::now_utc().to_timespec().sec;
let start = time::now_utc().to_timespec();
let run_id = format!("{}#{}", start.sec, start.nsec);

loop {
if sigint.load(Ordering::Relaxed) {
Expand Down Expand Up @@ -188,7 +189,7 @@ fn route(sinks: &Vec<config::Sink>,

// Rotate
for sink in sinks {
let dest_file = dir.join(format!("{}-{}-{}.metrics", sink.name, start, batch_count));
let dest_file = dir.join(format!("{}-{}-{}.metrics", sink.name, run_id, batch_count));
debug!("rotate tmp sink file to {}", format!("{:?}", dest_file));
try!(fs::rename(dir.join(format!("{}.tmp", sink.name)), dest_file));
}
Expand Down

0 comments on commit a354140

Please sign in to comment.