Skip to content

Commit

Permalink
fix: healthchecks site_root
Browse files Browse the repository at this point in the history
  • Loading branch information
NINNiT committed Sep 20, 2024
1 parent 90ee1c6 commit c86ce9a
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions apps/xenbakd/src/monitoring/healthchecks/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -78,8 +78,10 @@ impl MonitoringTrait for HealthchecksService {
.get(&self.generate_slug(job_name).await)
.context("Check not found")?;

let uuid = check.ping_url.split('/').last().unwrap();

self.client
.post(check.ping_url.clone())
.post(format!("{}/{}", self.config.server, uuid))
.json(&job_stats)
.send()
.await?;
Expand All @@ -95,8 +97,10 @@ impl MonitoringTrait for HealthchecksService {
.get(&self.generate_slug(job_name).await)
.context("Check not found")?;

let uuid = check.ping_url.split('/').last().unwrap();

self.client
.post(format!("{}/{}", check.ping_url, "start"))
.post(format!("{}/{}/{}", self.config.server, uuid, "start"))
.send()
.await?;

Expand All @@ -111,8 +115,10 @@ impl MonitoringTrait for HealthchecksService {
.get(&self.generate_slug(job_name).await)
.context("Check not found")?;

let uuid = check.ping_url.split('/').last().unwrap();

self.client
.post(format!("{}/{}", check.ping_url, "fail"))
.post(format!("{}/{}/{}", self.config.server, uuid, "start"))
.json(&job_stats)
.send()
.await?;
Expand Down

0 comments on commit c86ce9a

Please sign in to comment.