[bugfix] Tidy up remaining references to workers in cmd (#2889)

This commit is contained in:
tobi 2024-05-01 13:55:00 +02:00 committed by GitHub
parent 2300d5e73b
commit 1edcb06afe
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 1 additions and 5 deletions

View file

@ -52,7 +52,6 @@ func initState(ctx context.Context) (*state.State, error) {
func stopState(state *state.State) error {
err := state.DB.Close()
state.Workers.Stop()
state.Caches.Stop()
return err
}

View file

@ -127,8 +127,6 @@ func setupList(ctx context.Context) (*list, error) {
state.Caches.Init()
state.Caches.Start()
state.Workers.Start()
dbService, err := bundb.NewBunDBService(ctx, &state)
if err != nil {
return nil, fmt.Errorf("error creating dbservice: %w", err)
@ -148,7 +146,6 @@ func setupList(ctx context.Context) (*list, error) {
func (l *list) shutdown() error {
l.out.Flush()
err := l.dbService.Close()
l.state.Workers.Stop()
l.state.Caches.Stop()
return err
}

View file

@ -88,7 +88,7 @@ func (p *prune) shutdown() error {
errs.Appendf("error stopping database: %w", err)
}
p.state.Workers.Stop()
p.state.Workers.Scheduler.Stop()
p.state.Caches.Stop()
return errs.Combine()