Skip to content

Commit

Permalink
Fix date to timestamp; 0.0.21
Browse files Browse the repository at this point in the history
  • Loading branch information
the2pizza committed Oct 30, 2024
1 parent f0878e5 commit 92ad1bf
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 5 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 = "pony"
version = "0.0.20"
version = "0.0.21"
edition = "2021"

[dependencies]
Expand Down
Binary file removed deploy/pony-0.8.0
Binary file not shown.
3 changes: 2 additions & 1 deletion src/clickhouse.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,12 @@ pub async fn fetch_metrics_value(
) -> Result<Vec<MetricValue>, Box<dyn Error>> {
let metric_value_req = format!(
"SELECT
toInt64(toUnixTimestamp(toDateTime(anyLast(Date)))) AS latest,
toInt64(toUnixTimestamp(toDateTime(anyLast(Timestamp)))) AS latest,
Path AS metric,
toFloat64(anyLast(Value)) AS value
FROM default.graphite_data
WHERE metric LIKE '{env}.{cluster}%.{metric_postfix}'
AND Timestamp >= now() - INTERVAL 1 MINUTE
GROUP BY metric"
);

Expand Down
4 changes: 2 additions & 2 deletions src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ use crate::web::not_found;

#[derive(Parser)]
#[command(
version = "0.0.20",
version = "0.0.21",
about = "Pony - montiroing tool for Xray/Wireguard"
)]
struct Cli {
Expand Down Expand Up @@ -77,7 +77,7 @@ async fn main() -> std::io::Result<()> {
std::process::exit(1);
} else {
info!(">>> Settings: {:?}", settings);
info!(">>> Version: 0.0.20");
info!(">>> Version: 0.0.21");
}

let carbon_server = settings.carbon.address.clone();
Expand Down

0 comments on commit 92ad1bf

Please sign in to comment.