mirror of
https://github.com/superseriousbusiness/gotosocial.git
synced 2024-10-31 22:40:01 +00:00
[bugfix] Tidy up remaining references to workers in cmd (#2889)
This commit is contained in:
parent
2300d5e73b
commit
1edcb06afe
3 changed files with 1 additions and 5 deletions
|
@ -52,7 +52,6 @@ func initState(ctx context.Context) (*state.State, error) {
|
||||||
|
|
||||||
func stopState(state *state.State) error {
|
func stopState(state *state.State) error {
|
||||||
err := state.DB.Close()
|
err := state.DB.Close()
|
||||||
state.Workers.Stop()
|
|
||||||
state.Caches.Stop()
|
state.Caches.Stop()
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|
|
@ -127,8 +127,6 @@ func setupList(ctx context.Context) (*list, error) {
|
||||||
state.Caches.Init()
|
state.Caches.Init()
|
||||||
state.Caches.Start()
|
state.Caches.Start()
|
||||||
|
|
||||||
state.Workers.Start()
|
|
||||||
|
|
||||||
dbService, err := bundb.NewBunDBService(ctx, &state)
|
dbService, err := bundb.NewBunDBService(ctx, &state)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, fmt.Errorf("error creating dbservice: %w", err)
|
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 {
|
func (l *list) shutdown() error {
|
||||||
l.out.Flush()
|
l.out.Flush()
|
||||||
err := l.dbService.Close()
|
err := l.dbService.Close()
|
||||||
l.state.Workers.Stop()
|
|
||||||
l.state.Caches.Stop()
|
l.state.Caches.Stop()
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|
|
@ -88,7 +88,7 @@ func (p *prune) shutdown() error {
|
||||||
errs.Appendf("error stopping database: %w", err)
|
errs.Appendf("error stopping database: %w", err)
|
||||||
}
|
}
|
||||||
|
|
||||||
p.state.Workers.Stop()
|
p.state.Workers.Scheduler.Stop()
|
||||||
p.state.Caches.Stop()
|
p.state.Caches.Stop()
|
||||||
|
|
||||||
return errs.Combine()
|
return errs.Combine()
|
||||||
|
|
Loading…
Reference in a new issue