remove unused parameter

This commit is contained in:
adlerhurst 2024-12-04 11:24:21 +01:00
parent adc65daf06
commit 28f0c40cdd
7 changed files with 8 additions and 8 deletions

View File

@ -21,7 +21,7 @@ type Config struct {
TransactionDuration time.Duration
Handlers map[string]*ConfigOverwrites
ActiveInstancer interface {
ActiveInstances(string) []string
ActiveInstances() []string
}
}

View File

@ -23,7 +23,7 @@ type Config struct {
Handlers map[string]*ConfigOverwrites
ActiveInstancer interface {
ActiveInstances(string) []string
ActiveInstances() []string
}
}

View File

@ -43,7 +43,7 @@ type Config struct {
TriggerWithoutEvents Reduce
ActiveInstancer interface {
ActiveInstances(projectionName string) []string
ActiveInstances() []string
}
}
@ -174,7 +174,7 @@ func NewHandler(
txDuration: config.TransactionDuration,
queryInstances: func() ([]string, error) {
if config.ActiveInstancer != nil {
return config.ActiveInstancer.ActiveInstances((projection.Name())), nil
return config.ActiveInstancer.ActiveInstances(), nil
}
return nil, nil
},

View File

@ -311,7 +311,7 @@ func (w *NotificationWorker) log(workerID int, retry bool) *logging.Entry {
}
func (w *NotificationWorker) queryInstances(ctx context.Context, retry bool) ([]string, error) {
return w.queries.ActiveInstances("notification worker"), nil
return w.queries.ActiveInstances(), nil
}
func (w *NotificationWorker) triggerInstances(ctx context.Context, instances []string, workerID int, retry bool) {

View File

@ -32,7 +32,7 @@ type Queries interface {
GetActiveSigningWebKey(ctx context.Context) (*jose.JSONWebKey, error)
ActivePrivateSigningKey(ctx context.Context, t time.Time) (keys *query.PrivateKeys, err error)
ActiveInstances(string) []string
ActiveInstances() []string
}
type NotificationQueries struct {

View File

@ -143,7 +143,7 @@ func (q *InstanceSearchQueries) toQuery(query sq.SelectBuilder) sq.SelectBuilder
return query
}
func (q *Queries) ActiveInstances(projection string) []string {
func (q *Queries) ActiveInstances() []string {
return q.caches.activeInstances.Keys()
}

View File

@ -15,7 +15,7 @@ type Config struct {
MaxActiveInstances uint32
TransactionDuration time.Duration
ActiveInstancer interface {
ActiveInstances(string) []string
ActiveInstances() []string
}
}