mirror of
https://github.com/zitadel/zitadel.git
synced 2025-08-11 15:37:33 +00:00

# Which Problems Are Solved
The execution handler projection handles all events to check if an
execution has to be provided to the worker to execute.
In this logic all events would be processed from the beginning which is
not necessary.
# How the Problems Are Solved
Add the current state to the execution handler projection, to avoid
processing all existing events.
# Additional Changes
Add custom configuration to the default, so that the transactions are
limited to some events.
# Additional Context
None
(cherry picked from commit 21167a4bba
)
28 lines
643 B
Go
28 lines
643 B
Go
package setup
|
|
|
|
import (
|
|
"context"
|
|
_ "embed"
|
|
|
|
"github.com/zitadel/zitadel/internal/database"
|
|
"github.com/zitadel/zitadel/internal/eventstore"
|
|
)
|
|
|
|
var (
|
|
//go:embed 38.sql
|
|
backChannelLogoutCurrentState string
|
|
)
|
|
|
|
type BackChannelLogoutNotificationStart struct {
|
|
dbClient *database.DB
|
|
}
|
|
|
|
func (mig *BackChannelLogoutNotificationStart) Execute(ctx context.Context, e eventstore.Event) error {
|
|
_, err := mig.dbClient.ExecContext(ctx, backChannelLogoutCurrentState, e.Sequence(), e.CreatedAt(), e.Position())
|
|
return err
|
|
}
|
|
|
|
func (mig *BackChannelLogoutNotificationStart) String() string {
|
|
return "38_back_channel_logout_notification_start_"
|
|
}
|