Skip to content

Commit

Permalink
don't escalate when not escalation policy not configured (#89)
Browse files Browse the repository at this point in the history
  • Loading branch information
magaldima authored and VaibhavPage committed Aug 17, 2018
1 parent 2d5f00a commit 856ecb9
Show file tree
Hide file tree
Showing 5 changed files with 229 additions and 218 deletions.
2 changes: 1 addition & 1 deletion controller/controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ func (c *SensorController) processNextItem() bool {
ctx := newSensorOperationCtx(sensor, c)

err = c.handleErr(ctx.operate(), key)
if err != nil {
if err != nil && ctx.s.Spec.Escalation != nil {
// now let's escalate the sensor
// the context should have the most up-to-date version
log.Infof("escalating sensor to level %s via %s message", ctx.s.Spec.Escalation.Level, ctx.s.Spec.Escalation.Message.Stream.Type)
Expand Down
Loading

0 comments on commit 856ecb9

Please sign in to comment.