mirror of
https://github.com/zitadel/zitadel.git
synced 2025-08-12 07:57:32 +00:00
fix(queue): reset projection list before each Register
call (#10001)
if Zitadel was started using `start-from-init` or `start-from-setup` there were rare cases where a panic occured when `Notifications.LegacyEnabled` was set to false. The cause was a list which was not reset before refilling. The list is now reset before each time it gets filled. Ensure all contexts are canceled for the init and setup functions for `start-from-init- or `start-from-setup` commands. none
This commit is contained in:
@@ -40,6 +40,9 @@ func Register(
|
||||
tokenLifetime time.Duration,
|
||||
client *database.DB,
|
||||
) {
|
||||
// make sure the slice does not contain old values
|
||||
projections = nil
|
||||
|
||||
q := handlers.NewNotificationQueries(queries, es, externalDomain, externalPort, externalSecure, fileSystemPath, userEncryption, smtpEncryption, smsEncryption)
|
||||
c := newChannels(q)
|
||||
projections = append(projections, handlers.NewUserNotifier(ctx, projection.ApplyCustomConfig(userHandlerCustomConfig), commands, q, c, otpEmailTmpl, notificationWorkerConfig.LegacyEnabled))
|
||||
|
Reference in New Issue
Block a user