diff --git a/go.mod b/go.mod index c031a6e17..a78573d51 100644 --- a/go.mod +++ b/go.mod @@ -20,7 +20,7 @@ require ( github.com/fergusstrange/embedded-postgres v1.25.0 github.com/flanksource/artifacts v1.0.4 github.com/flanksource/commons v1.22.1 - github.com/flanksource/duty v1.0.441 + github.com/flanksource/duty v1.0.442 github.com/flanksource/gomplate/v3 v3.24.7 github.com/flanksource/is-healthy v1.0.6 github.com/flanksource/kommons v0.31.4 diff --git a/go.sum b/go.sum index 57664a70c..2bcdadd9f 100644 --- a/go.sum +++ b/go.sum @@ -858,8 +858,8 @@ github.com/flanksource/artifacts v1.0.4 h1:KjQTwsvQ73uHqTK7o4Jwt/RW8fyxJOTJ6JLgz github.com/flanksource/artifacts v1.0.4/go.mod h1:wkbdseaTkDo4Q6k6T86vXd4Uy47M6NPCmexgHvCTDl0= github.com/flanksource/commons v1.22.1 h1:Ycg8r26bx537UTdAEFgngDW1r2j5bX6Lr3NGxLICpiw= github.com/flanksource/commons v1.22.1/go.mod h1:GD5+yGvmYFPIW3WMNN+y1JkeDMJY74e05pQAsRbrvwY= -github.com/flanksource/duty v1.0.441 h1:4srUr5jcce9Q0/s7M2cCRyur5DSeSS+HOtC57QrD4DY= -github.com/flanksource/duty v1.0.441/go.mod h1:eF0Z6vZ2vSO1vy8HDYMc+OkhGWx4Pg5+P16gUuL8+oI= +github.com/flanksource/duty v1.0.442 h1:UCqZDteQJfWYN3c5HNuuaMCpaQAqa3eejn5oXlRjUJY= +github.com/flanksource/duty v1.0.442/go.mod h1:eF0Z6vZ2vSO1vy8HDYMc+OkhGWx4Pg5+P16gUuL8+oI= github.com/flanksource/gomplate/v3 v3.20.4/go.mod h1:27BNWhzzSjDed1z8YShO6W+z6G9oZXuxfNFGd/iGSdc= github.com/flanksource/gomplate/v3 v3.24.7 h1:XVIwcOTIR9l95D+jaerHcqRFN2Mo6MNEMttxsEsZ9aY= github.com/flanksource/gomplate/v3 v3.24.7/go.mod h1:7SJHGdFITvw3I8qf/ppF1BXbL2/ENyI5vpQkWt8MHtU= diff --git a/hack/generate-schemas/go.mod b/hack/generate-schemas/go.mod index ba2efb29e..d2722b1df 100644 --- a/hack/generate-schemas/go.mod +++ b/hack/generate-schemas/go.mod @@ -51,7 +51,7 @@ require ( github.com/evanphx/json-patch v5.7.0+incompatible // indirect github.com/exaring/otelpgx v0.5.2 // indirect github.com/felixge/httpsnoop v1.0.4 // indirect - github.com/flanksource/duty v1.0.441 // indirect + github.com/flanksource/duty v1.0.442 // indirect github.com/flanksource/is-healthy v1.0.6 // indirect github.com/flanksource/kommons v0.31.4 // indirect github.com/flanksource/kubectl-neat v1.0.4 // indirect diff --git a/hack/generate-schemas/go.sum b/hack/generate-schemas/go.sum index 853fbf556..c97a52ecb 100644 --- a/hack/generate-schemas/go.sum +++ b/hack/generate-schemas/go.sum @@ -735,8 +735,8 @@ github.com/felixge/httpsnoop v1.0.4 h1:NFTV2Zj1bL4mc9sqWACXbQFVBBg2W3GPvqp8/ESS2 github.com/felixge/httpsnoop v1.0.4/go.mod h1:m8KPJKqk1gH5J9DgRY2ASl2lWCfGKXixSwevea8zH2U= github.com/flanksource/commons v1.22.1 h1:Ycg8r26bx537UTdAEFgngDW1r2j5bX6Lr3NGxLICpiw= github.com/flanksource/commons v1.22.1/go.mod h1:GD5+yGvmYFPIW3WMNN+y1JkeDMJY74e05pQAsRbrvwY= -github.com/flanksource/duty v1.0.441 h1:4srUr5jcce9Q0/s7M2cCRyur5DSeSS+HOtC57QrD4DY= -github.com/flanksource/duty v1.0.441/go.mod h1:eF0Z6vZ2vSO1vy8HDYMc+OkhGWx4Pg5+P16gUuL8+oI= +github.com/flanksource/duty v1.0.442 h1:UCqZDteQJfWYN3c5HNuuaMCpaQAqa3eejn5oXlRjUJY= +github.com/flanksource/duty v1.0.442/go.mod h1:eF0Z6vZ2vSO1vy8HDYMc+OkhGWx4Pg5+P16gUuL8+oI= github.com/flanksource/gomplate/v3 v3.20.4/go.mod h1:27BNWhzzSjDed1z8YShO6W+z6G9oZXuxfNFGd/iGSdc= github.com/flanksource/gomplate/v3 v3.24.7 h1:XVIwcOTIR9l95D+jaerHcqRFN2Mo6MNEMttxsEsZ9aY= github.com/flanksource/gomplate/v3 v3.24.7/go.mod h1:7SJHGdFITvw3I8qf/ppF1BXbL2/ENyI5vpQkWt8MHtU= diff --git a/pkg/cache/postgres.go b/pkg/cache/postgres.go index 06ff1c51e..70ec5f73b 100644 --- a/pkg/cache/postgres.go +++ b/pkg/cache/postgres.go @@ -78,7 +78,7 @@ func (c *postgresCache) AddCheckStatus(db *gorm.DB, check pkg.Check, status pkg. if c.DB().Model(&checks). Clauses(clause.Returning{Columns: []clause.Column{{Name: "id"}}}). Where("canary_id = ? AND type = ? AND name = ?", check.CanaryID, check.Type, check.GetName()). - Updates(map[string]any{"status": check.Status, "labels": check.Labels, "last_runtime": time.Now(), "next_runtime": nextRuntime}).Error != nil { + Updates(map[string]any{"status": check.Status, "labels": check.Labels, "last_runtime": status.Time, "next_runtime": nextRuntime}).Error != nil { logger.Errorf("error updating check: %v", err) return }