diff --git a/pkg/cache/postgres.go b/pkg/cache/postgres.go index f2c9966da..06ff1c51e 100644 --- a/pkg/cache/postgres.go +++ b/pkg/cache/postgres.go @@ -58,7 +58,7 @@ func (c *postgresCache) AddCheckFromStatus(check pkg.Check, status pkg.CheckStat } if check.ID != uuid.Nil { - return uuid.Nil, nil + return check.ID, nil } return db.PersistCheck(c.DB(), check, check.CanaryID) diff --git a/pkg/jobs/canary/canary_jobs.go b/pkg/jobs/canary/canary_jobs.go index c8a384846..c1aa540c3 100644 --- a/pkg/jobs/canary/canary_jobs.go +++ b/pkg/jobs/canary/canary_jobs.go @@ -173,6 +173,7 @@ func (j CanaryJob) Run(ctx dutyjob.JobRuntime) error { // Update last runtime map canaryLastRuntimes.Store(canaryID, time.Now()) + ctx.History.SuccessCount = len(results) return nil }