diff --git a/cmd/mirror/projections.go b/cmd/mirror/projections.go index 163bf55325..87016622e0 100644 --- a/cmd/mirror/projections.go +++ b/cmd/mirror/projections.go @@ -285,13 +285,6 @@ func execProjections(ctx context.Context, instances <-chan string, failedInstanc continue } - err = projection.ProjectInstanceFields(ctx) - if err != nil { - logging.WithFields("instance", instance).WithError(err).Info("trigger fields failed") - failedInstances <- instance - continue - } - err = auth_handler.ProjectInstance(ctx) if err != nil { logging.WithFields("instance", instance).OnError(err).Info("trigger auth handler failed") diff --git a/internal/query/projection/projection.go b/internal/query/projection/projection.go index cf4fc37ddd..25267b4d85 100644 --- a/internal/query/projection/projection.go +++ b/internal/query/projection/projection.go @@ -101,7 +101,6 @@ type projection interface { var ( projections []projection - fields []*handler.FieldHandler ) func Create(ctx context.Context, sqlClient *database.DB, es handler.EventStore, config Config, keyEncryptionAlgorithm crypto.EncryptionAlgorithm, certEncryptionAlgorithm crypto.EncryptionAlgorithm, systemUsers map[string]*internal_authz.SystemAPIUser) error { @@ -183,7 +182,6 @@ func Create(ctx context.Context, sqlClient *database.DB, es handler.EventStore, MembershipFields = newFillMembershipFields(applyCustomConfig(projectionConfig, config.Customizations[fieldsMemberships])) newProjectionsList() - newFieldsList() return nil } @@ -217,18 +215,6 @@ func ProjectInstance(ctx context.Context) error { return nil } -func ProjectInstanceFields(ctx context.Context) error { - for i, fieldProjection := range fields { - logging.WithFields("name", fieldProjection.ProjectionName(), "instance", internal_authz.GetInstance(ctx).InstanceID(), "index", fmt.Sprintf("%d/%d", i, len(fields))).Info("starting fields projection") - err := fieldProjection.Trigger(ctx) - if err != nil { - return err - } - logging.WithFields("name", fieldProjection.ProjectionName(), "instance", internal_authz.GetInstance(ctx).InstanceID()).Info("fields projection done") - } - return nil -} - func ApplyCustomConfig(customConfig CustomConfig) handler.Config { return applyCustomConfig(projectionConfig, customConfig) } @@ -253,17 +239,6 @@ func applyCustomConfig(config handler.Config, customConfig CustomConfig) handler return config } -// we know this is ugly, but we need to have a singleton slice of all projections -// and are only able to initialize it after all projections are created -// as setup and start currently create them individually, we make sure we get the right one -// will be refactored when changing to new id based projections -func newFieldsList() { - fields = []*handler.FieldHandler{ - ProjectGrantFields, - OrgDomainVerifiedFields, - } -} - // we know this is ugly, but we need to have a singleton slice of all projections // and are only able to initialize it after all projections are created // as setup and start currently create them individually, we make sure we get the right one