Skip to content

Commit

Permalink
[bugfix] Tidy up remaining references to workers in cmd (superserious…
Browse files Browse the repository at this point in the history
  • Loading branch information
tsmethurst authored and nyarla committed Jun 19, 2024
1 parent 4a97e84 commit 5576310
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 5 deletions.
1 change: 0 additions & 1 deletion cmd/gotosocial/action/admin/account/account.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand Down
3 changes: 0 additions & 3 deletions cmd/gotosocial/action/admin/media/list.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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
}
Expand Down
2 changes: 1 addition & 1 deletion cmd/gotosocial/action/admin/media/prune/common.go
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down

0 comments on commit 5576310

Please sign in to comment.