diff options
| author | 2025-03-05 19:12:53 +0100 | |
|---|---|---|
| committer | 2025-03-05 19:12:53 +0100 | |
| commit | 69461c461b79dbeb9b55ba83d2b7308772194d7f (patch) | |
| tree | 481f39bd01ded500989faa658069db6cc0fce7dc /cmd/gotosocial/action/admin/media | |
| parent | [feature] Add token review / delete to backend + settings panel (#3845) (diff) | |
| download | gotosocial-69461c461b79dbeb9b55ba83d2b7308772194d7f.tar.xz | |
[bugfix] Return useful err on `server start` failure (#3879)
* [bugfix] Return useful err on `server start` failure
* remove scheduler started func
* remove tryUntil
Diffstat (limited to 'cmd/gotosocial/action/admin/media')
| -rw-r--r-- | cmd/gotosocial/action/admin/media/list.go | 4 | ||||
| -rw-r--r-- | cmd/gotosocial/action/admin/media/prune/common.go | 4 |
2 files changed, 6 insertions, 2 deletions
diff --git a/cmd/gotosocial/action/admin/media/list.go b/cmd/gotosocial/action/admin/media/list.go index a017539ed..e80c0da51 100644 --- a/cmd/gotosocial/action/admin/media/list.go +++ b/cmd/gotosocial/action/admin/media/list.go @@ -125,7 +125,9 @@ func setupList(ctx context.Context) (*list, error) { } state.Caches.Init() - state.Caches.Start() + if err := state.Caches.Start(); err != nil { + return nil, fmt.Errorf("error starting caches: %w", err) + } // Only set state DB connection. // Don't need Actions or Workers for this. diff --git a/cmd/gotosocial/action/admin/media/prune/common.go b/cmd/gotosocial/action/admin/media/prune/common.go index d73676f5b..fce445fb0 100644 --- a/cmd/gotosocial/action/admin/media/prune/common.go +++ b/cmd/gotosocial/action/admin/media/prune/common.go @@ -42,7 +42,9 @@ func setupPrune(ctx context.Context) (*prune, error) { var state state.State state.Caches.Init() - state.Caches.Start() + if err := state.Caches.Start(); err != nil { + return nil, fmt.Errorf("error starting caches: %w", err) + } // Scheduler is required for the // cleaner, but no other workers |
