fix(spooler): improve check for failure count (#326)

* fix(spooler): improve check for failure count

* fix(spooler): add tests for HandleError

* fix(spooler): correct test
This commit is contained in:
Silvan
2020-07-02 08:08:55 +02:00
committed by GitHub
parent fcdf27c683
commit 682d623343
2 changed files with 107 additions and 4 deletions
+2 -1
View File
@@ -2,6 +2,7 @@ package spooler
import (
"context"
"github.com/caos/logging"
"github.com/caos/zitadel/internal/eventstore"
"github.com/caos/zitadel/internal/eventstore/models"
@@ -117,7 +118,7 @@ func HandleError(event *models.Event, failedErr error,
if err != nil {
return err
}
if errorCountUntilSkip == failedEvent.FailureCount {
if errorCountUntilSkip <= failedEvent.FailureCount {
return processSequence(event.Sequence)
}
return nil