summaryrefslogtreecommitdiff
path: root/cmd
diff options
context:
space:
mode:
authorLibravatar tobi <31960611+tsmethurst@users.noreply.github.com>2024-05-01 13:55:00 +0200
committerLibravatar GitHub <noreply@github.com>2024-05-01 12:55:00 +0100
commit1edcb06afe05b16ba49b67be2f449af9061a184c (patch)
treea8dc373176894cd2c5df76dac2e94637355c09b9 /cmd
parent[bugfix] function queue memory pools limitlessly grow (#2882) (diff)
downloadgotosocial-1edcb06afe05b16ba49b67be2f449af9061a184c.tar.xz
[bugfix] Tidy up remaining references to workers in cmd (#2889)
Diffstat (limited to 'cmd')
-rw-r--r--cmd/gotosocial/action/admin/account/account.go1
-rw-r--r--cmd/gotosocial/action/admin/media/list.go3
-rw-r--r--cmd/gotosocial/action/admin/media/prune/common.go2
3 files changed, 1 insertions, 5 deletions
diff --git a/cmd/gotosocial/action/admin/account/account.go b/cmd/gotosocial/action/admin/account/account.go
index 0693dd04e..57d0d3805 100644
--- a/cmd/gotosocial/action/admin/account/account.go
+++ b/cmd/gotosocial/action/admin/account/account.go
@@ -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
}
diff --git a/cmd/gotosocial/action/admin/media/list.go b/cmd/gotosocial/action/admin/media/list.go
index ed10c967a..9791a9f51 100644
--- a/cmd/gotosocial/action/admin/media/list.go
+++ b/cmd/gotosocial/action/admin/media/list.go
@@ -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
}
diff --git a/cmd/gotosocial/action/admin/media/prune/common.go b/cmd/gotosocial/action/admin/media/prune/common.go
index fcdb2bcf2..292b4a18b 100644
--- a/cmd/gotosocial/action/admin/media/prune/common.go
+++ b/cmd/gotosocial/action/admin/media/prune/common.go
@@ -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()