Skip to content

Commit

Permalink
fix: cronjob message
Browse files Browse the repository at this point in the history
  • Loading branch information
moshloop committed Dec 1, 2024
1 parent 665a9c2 commit 2b39393
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions pkg/health/health_cronjob.go
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ func getBatchv1CronJobHealth(job *batchv1.CronJob) (*HealthStatus, error) {
return &HealthStatus{
Health: HealthHealthy,
Status: HealthStatusRunning,
Message: "Running since" + job.Status.LastScheduleTime.Format("2006-01-02 15:04:05 -0700"),
Message: "Running since " + job.Status.LastScheduleTime.Format("2006-01-02 15:04:05 -0700"),
}, nil
}

Expand All @@ -51,7 +51,7 @@ func getBatchv1CronJobHealth(job *batchv1.CronJob) (*HealthStatus, error) {
Ready: true, // The cronjob did in fact run
Health: HealthUnhealthy,
Status: HealthStatusError,
Message: "Last run failed, last successful run was" + job.Status.LastSuccessfulTime.Format(
Message: "Last run failed, last successful run was " + job.Status.LastSuccessfulTime.Format(
"2006-01-02 15:04:05 -0700",
),
}, nil
Expand All @@ -62,7 +62,7 @@ func getBatchv1CronJobHealth(job *batchv1.CronJob) (*HealthStatus, error) {
Health: HealthHealthy,
Status: HealthStatusCompleted,
Message: fmt.Sprintf(
"Last run at %s in %s",
"Last run at %s for %s",
job.Status.LastScheduleTime.Format("2006-01-02 15:04:05 -0700"),
job.Status.LastSuccessfulTime.Sub(job.Status.LastScheduleTime.Time),
),
Expand Down

0 comments on commit 2b39393

Please sign in to comment.