mirror of
https://github.com/superseriousbusiness/gotosocial.git
synced 2024-12-22 10:12:11 +00:00
[bugfix] Tidy up remaining references to workers in cmd (#2889)
This commit is contained in:
parent
2300d5e73b
commit
1edcb06afe
|
@ -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
|
||||
}
|
||||
|
|
|
@ -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
|
||||
}
|
||||
|
|
|
@ -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()
|
||||
|
|
Loading…
Reference in a new issue