Skip to content

Commit

Permalink
optimize
Browse files Browse the repository at this point in the history
  • Loading branch information
justlorain committed Apr 5, 2024
1 parent a2e0411 commit 991c2b9
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions cron/cron.go
Original file line number Diff line number Diff line change
Expand Up @@ -40,14 +40,13 @@ import (

var ErrReachedRetryTimes = errors.New("error reached retry times")

var GlobalCleaner *cleaner.Cleaner
var GlobalCleaner = cleaner.New()

func Start(ctx context.Context) error {
slog.Info("openalysis service started")

errC := make(chan error, 1)

GlobalCleaner = cleaner.New()
if err := GlobalCleaner.AddStrategies(config.GlobalConfig.Cleaner...); err != nil {
return err
}
Expand Down Expand Up @@ -84,7 +83,6 @@ func Restart(ctx context.Context) error {

errC := make(chan error, 1)

GlobalCleaner = cleaner.New()
if err := GlobalCleaner.AddStrategies(config.GlobalConfig.Cleaner...); err != nil {
return err
}
Expand Down

0 comments on commit 991c2b9

Please sign in to comment.