Compare commits
3 Commits
Author | SHA1 | Date |
---|---|---|
IamTheFij | 4b16dea34e | |
IamTheFij | 7b313b8f9b | |
IamTheFij | bea338c27a |
2
main.go
2
main.go
|
@ -258,6 +258,8 @@ func runSpecifiedJobs(jobs []Job, backupJobs, restoreJobs, unlockJobs, snapshot
|
|||
|
||||
func maybePushMetrics(metricsPushGateway string) error {
|
||||
if metricsPushGateway != "" {
|
||||
fmt.Println("Pushing metrics to push gateway")
|
||||
|
||||
if err := Metrics.PushToGateway(metricsPushGateway); err != nil {
|
||||
return fmt.Errorf("Failed pushing metrics after jobs run: %w", err)
|
||||
}
|
||||
|
|
|
@ -115,6 +115,8 @@ func ScheduleAndRunJobs(jobs []Job) error {
|
|||
defer func() {
|
||||
ctx := scheduler.Stop()
|
||||
<-ctx.Done()
|
||||
|
||||
fmt.Println("All jobs successfully stopped")
|
||||
}()
|
||||
|
||||
return nil
|
||||
|
|
Loading…
Reference in New Issue