Skip to content

Commit

Permalink
adjusting default crawling frequency from 3 seconds into 15 seconds
Browse files Browse the repository at this point in the history
  • Loading branch information
tommady committed Dec 14, 2021
1 parent 7a1fa85 commit 1774d6d
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "findora-exporter"
version = "1.0.0"
version = "1.0.1"
authors = ["tommady <[email protected]>"]
edition = "2021"
readme = "README.md"
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ cargo build --release
### Default Configuration Behavior

* listening `127.0.0.1:9090` address for Prometheus scraping
* crawling `http://127.0.0.1:26657` every 3 seconds
* crawling `http://127.0.0.1:26657` every 15 seconds
* displaying `trace` level information

### Specific A Configuration
Expand Down
2 changes: 1 addition & 1 deletion src/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ impl Default for Crawler {
Crawler {
targets: vec![Target {
host_addr: "http://127.0.0.1:26657".to_string(),
frequency_ms: 3000,
frequency_ms: 15000,
registry: None,
}],
}
Expand Down
2 changes: 1 addition & 1 deletion src/crawler.rs
Original file line number Diff line number Diff line change
Expand Up @@ -99,12 +99,12 @@ impl Worker {
];

while !done.load(Ordering::SeqCst) {
thread::sleep(freq);
for task in &tasks {
if let Err(e) = (task.f)(&addr, metric.clone()) {
error!("{} failed: {:?}", task.name, e);
}
}
thread::sleep(freq);
}
})));
}
Expand Down

0 comments on commit 1774d6d

Please sign in to comment.