Skip to content

Commit

Permalink
Remove legacy options and CLI args (#306)
Browse files Browse the repository at this point in the history
  • Loading branch information
snormore authored Sep 12, 2023
1 parent ed288db commit 4da3cff
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 12 deletions.
8 changes: 0 additions & 8 deletions pkg/server/options.go
Original file line number Diff line number Diff line change
Expand Up @@ -73,12 +73,4 @@ type Options struct {
Metrics MetricsOptions `group:"Metrics Options"`
Tracing TracingOptions `group:"DD APM Tracing Options"`
Profiling ProfilingOptions `group:"DD APM Profiling Options" namespace:"profiling"`

// Legacy args
StoreEnable bool `long:"store"`
FilterEnable bool `long:"filter"`
LightpushEnable bool `long:"lightpush"`
KeepHistoryDays int `long:"keep-history-days" default:"7"`
Resume bool `long:"resume"`
CleanerEnable bool `long:"cleaner.enable"`
}
5 changes: 1 addition & 4 deletions pkg/server/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -143,10 +143,7 @@ func New(ctx context.Context, log *zap.Logger, options Options) (*Server, error)
}
}

if options.StoreEnable || options.Store.Enable {
if options.CleanerEnable {
options.Store.Cleaner.Enable = true
}
if options.Store.Enable {
s.db, err = createDB(options.Store.DbConnectionString, options.WaitForDB, options.Store.ReadTimeout, options.Store.WriteTimeout, options.Store.MaxOpenConns)
if err != nil {
return nil, errors.Wrap(err, "creating db")
Expand Down

0 comments on commit 4da3cff

Please sign in to comment.