Skip to content

Commit

Permalink
feat: refresh check size summary view
Browse files Browse the repository at this point in the history
  • Loading branch information
adityathebe committed May 2, 2024
1 parent a3c872c commit 7498273
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 6 deletions.
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -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.439
github.com/flanksource/duty v1.0.441
github.com/flanksource/gomplate/v3 v3.24.7
github.com/flanksource/is-healthy v1.0.4
github.com/flanksource/kommons v0.31.4
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -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.439 h1:AyTx7/K0E86W37xOvoTzmUgTs7snQ+CS6qPt0zj5lkw=
github.com/flanksource/duty v1.0.439/go.mod h1:eF0Z6vZ2vSO1vy8HDYMc+OkhGWx4Pg5+P16gUuL8+oI=
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/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=
Expand Down
2 changes: 1 addition & 1 deletion hack/generate-schemas/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -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.439 // indirect
github.com/flanksource/duty v1.0.441 // indirect
github.com/flanksource/is-healthy v1.0.4 // indirect
github.com/flanksource/kommons v0.31.4 // indirect
github.com/flanksource/kubectl-neat v1.0.4 // indirect
Expand Down
4 changes: 2 additions & 2 deletions hack/generate-schemas/go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -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.439 h1:AyTx7/K0E86W37xOvoTzmUgTs7snQ+CS6qPt0zj5lkw=
github.com/flanksource/duty v1.0.439/go.mod h1:eF0Z6vZ2vSO1vy8HDYMc+OkhGWx4Pg5+P16gUuL8+oI=
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/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=
Expand Down
12 changes: 12 additions & 0 deletions pkg/db/check_statuses.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,18 @@ import (

const CheckStatuses = "check_statuses"

var RefreshCheckSizeSummary = &job.Job{
Name: "RefreshCheckSizeSummary",
Singleton: true,
Schedule: "@every 24h",
JobHistory: true,
Retention: job.RetentionFew,
Fn: func(ctx job.JobRuntime) error {
ctx.History.ResourceType = CheckStatuses
return job.RefreshCheckSizeSummary(ctx.Context)
},
}

var RefreshCheckStatusSummary = &job.Job{
Name: "RefreshCheckStatusSummary",
Singleton: true,
Expand Down

0 comments on commit 7498273

Please sign in to comment.