diff --git a/models/notifications.go b/models/notifications.go index 0d4813a3..819f8bba 100644 --- a/models/notifications.go +++ b/models/notifications.go @@ -16,7 +16,6 @@ type Notification struct { Namespace string `json:"namespace,omitempty"` Events pq.StringArray `json:"events" gorm:"type:[]text"` Title string `json:"title,omitempty"` - WaitFor *time.Duration `json:"wait_for,omitempty"` Template string `json:"template,omitempty"` Filter string `json:"filter,omitempty"` PersonID *uuid.UUID `json:"person_id,omitempty"` @@ -31,7 +30,14 @@ type Notification struct { CreatedAt time.Time `json:"created_at" time_format:"postgres_timestamp" gorm:"<-:false"` DeletedAt *time.Time `json:"deleted_at,omitempty"` - // Error stores errors in notification filters (if any) + // Duration to wait before re-evaluating health of the resource. + WaitFor *time.Duration `json:"wait_for,omitempty"` + + // Duration to wait after triggering incremental scrape for kubernetes config. + // Works together with waitFor duration. + WaitForEvalPeriod *time.Duration `json:"wait_for_eval_period,omitempty"` + + // Error stores errors in notification filters (if any). Error *string `json:"error,omitempty"` } diff --git a/schema/notifications.hcl b/schema/notifications.hcl index 8e33c15e..3b267563 100644 --- a/schema/notifications.hcl +++ b/schema/notifications.hcl @@ -59,6 +59,11 @@ table "notifications" { type = bigint comment = "duration in nanoseconds" } + column "wait_for_eval_period" { + null = true + type = bigint + comment = "duration in nanoseconds" + } column "group_by" { null = true type = sql("text[]")