fix: handle sequence correctly in subscription (#1209)

This commit is contained in:
Livio Amstutz
2021-01-27 10:35:01 +01:00
committed by GitHub
parent 6f6d59f380
commit 1d472bac51
129 changed files with 349 additions and 371 deletions

View File

@@ -48,8 +48,8 @@ func (a *Application) AggregateTypes() []models.AggregateType {
return []models.AggregateType{es_model.ProjectAggregate}
}
func (a *Application) CurrentSequence(event *models.Event) (uint64, error) {
sequence, err := a.view.GetLatestApplicationSequence(string(event.AggregateType))
func (a *Application) CurrentSequence() (uint64, error) {
sequence, err := a.view.GetLatestApplicationSequence()
if err != nil {
return 0, err
}
@@ -57,7 +57,7 @@ func (a *Application) CurrentSequence(event *models.Event) (uint64, error) {
}
func (a *Application) EventQuery() (*models.SearchQuery, error) {
sequence, err := a.view.GetLatestApplicationSequence("")
sequence, err := a.view.GetLatestApplicationSequence()
if err != nil {
return nil, err
}