reminder: uses UpdatedAt to track state changes.

This commit is contained in:
bergquist
2018-10-02 11:19:09 +02:00
parent 9e09b2b969
commit 7f1d7cefc0
7 changed files with 21 additions and 25 deletions

View File

@@ -68,7 +68,7 @@ func (n *notificationService) sendAndMarkAsComplete(evalContext *EvalContext, no
if err != nil {
n.log.Error("failed to send notification", "id", not.GetNotifierId())
} else {
notifierState.state.SentAt = time.Now().UTC().Unix()
notifierState.state.UpdatedAt = time.Now().UTC().Unix()
}
if evalContext.IsTestRun {
@@ -185,7 +185,7 @@ func (n *notificationService) getNeededNotifiers(orgId int64, notificationIds []
err = bus.DispatchCtx(evalContext.Ctx, query)
if err != nil {
n.log.Error("Could not get notification state.", "notifier", notification.Id)
n.log.Error("Could not get notification state.", "notifier", notification.Id, "error", err)
continue
}