Skip to content

Commit

Permalink
Merge pull request #15179 from bednar/check-cron
Browse files Browse the repository at this point in the history
fix(alerts): remove the cron option from checks/rules
  • Loading branch information
kelwang authored Sep 24, 2019
2 parents 236e8c1 + 265bc7b commit c3127c8
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 15 deletions.
6 changes: 0 additions & 6 deletions http/swagger.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9361,9 +9361,6 @@ components:
offset:
description: Duration to delay after the schedule, before executing check.
type: string
cron:
description: The check repetition interval in the form `* * * * * *`.
type: string
tags:
description: List of tags to write to each status.
type: array
Expand Down Expand Up @@ -9545,9 +9542,6 @@ components:
offset:
description: Duration to delay after the schedule, before executing check.
type: string
cron:
description: The notification repetition interval in the form `* * * * * *`.
type: string
runbookLink:
type: string
limitEvery:
Expand Down
4 changes: 0 additions & 4 deletions notification/check/check.go
Original file line number Diff line number Diff line change
Expand Up @@ -84,10 +84,6 @@ func (b Base) generateTaskOption() ast.Statement {

props = append(props, flux.Property("name", flux.String(b.Name)))

if b.Cron != "" {
props = append(props, flux.Property("cron", flux.String(b.Cron)))
}

if b.Every != nil {
props = append(props, flux.Property("every", (*ast.DurationLiteral)(b.Every)))
}
Expand Down
5 changes: 0 additions & 5 deletions notification/rule/rule.go
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,6 @@ type Base struct {
TaskID influxdb.ID `json:"taskID,omitempty"`
// SleepUntil is an optional sleeptime to start a task.
SleepUntil *time.Time `json:"sleepUntil,omitempty"`
Cron string `json:"cron,omitempty"`
Every *notification.Duration `json:"every,omitempty"`
// Offset represents a delay before execution.
// It gets marshalled from a string duration, i.e.: "10s" is 10 seconds
Expand Down Expand Up @@ -263,10 +262,6 @@ func (b *Base) generateTaskOption() ast.Statement {

props = append(props, flux.Property("name", flux.String(b.Name)))

if b.Cron != "" {
props = append(props, flux.Property("cron", flux.String(b.Cron)))
}

if b.Every != nil {
// Make the windows overlap and filter records from previous queries.
// This is so that we wont miss the first points possible state change.
Expand Down

0 comments on commit c3127c8

Please sign in to comment.