Skip to content

Commit

Permalink
Add .dockerignore file
Browse files Browse the repository at this point in the history
  • Loading branch information
saolof committed May 17, 2024
1 parent 139aba5 commit 8eae906
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 4 deletions.
5 changes: 5 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
Dockerfile
README.md
logo.webp
pgxcron
**/.git
10 changes: 6 additions & 4 deletions monitor.go
Original file line number Diff line number Diff line change
Expand Up @@ -141,9 +141,10 @@ func (m Monitor) collectDatabaseStatuses(desc *prometheus.Desc, ch chan<- promet
onfire = 0.0
}
metric, err := prometheus.NewConstMetric(desc, prometheus.GaugeValue, onfire, database)
if err == nil {
ch <- metric
if err != nil {
metric = prometheus.NewInvalidMetric(desc, err)
}
ch <- metric
}
}

Expand All @@ -154,9 +155,10 @@ func (m Monitor) collectJobStatuses(desc *prometheus.Desc, ch chan<- prometheus.
}
for _, status := range statuses {
metric, err := prometheus.NewConstMetric(desc, prometheus.GaugeValue, float64(status.Succeeded), status.Jobname)
if err == nil {
ch <- metric
if err != nil {
metric = prometheus.NewInvalidMetric(desc, err)
}
ch <- metric
}
}

Expand Down

0 comments on commit 8eae906

Please sign in to comment.