Skip to content

Commit

Permalink
Fixed a minor bug, dates should now work in prom.
Browse files Browse the repository at this point in the history
  • Loading branch information
Phara0h committed Nov 18, 2020
1 parent e2f81cb commit 0cc7817
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion src/health-check.js
Original file line number Diff line number Diff line change
Expand Up @@ -278,7 +278,8 @@ class HealthCheck {
service.status.last_unhealthy = process.hrtime.bigint();
}
}
await this.stats.updateService(service.name, service.status);

this.stats.updateService(service.name, service.status);

await this.alerts.alert(service);
service.status.last_status = service.status.up;
Expand Down
2 changes: 1 addition & 1 deletion src/misc/stats.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ class Stats {
for (var i = 0; i < this.services.length; i++) {
if (this.services[i].name == name) {
this.services[i].status = status;
this.services.date = Date.now();
this.services[i].date = Date.now();
return;
}
}
Expand Down

0 comments on commit 0cc7817

Please sign in to comment.