mirror of
https://github.com/superseriousbusiness/gotosocial.git
synced 2025-11-18 13:27:28 -06:00
[bugfix] Rework MultiError to wrap + unwrap errors properly (#2057)
* rework multierror a bit * test multierror
This commit is contained in:
parent
2cee8f2dd8
commit
e8a20f587c
24 changed files with 263 additions and 154 deletions
|
|
@ -75,14 +75,14 @@ func setupPrune(ctx context.Context) (*prune, error) {
|
|||
}
|
||||
|
||||
func (p *prune) shutdown(ctx context.Context) error {
|
||||
var errs gtserror.MultiError
|
||||
errs := gtserror.NewMultiError(2)
|
||||
|
||||
if err := p.storage.Close(); err != nil {
|
||||
errs.Appendf("error closing storage backend: %v", err)
|
||||
errs.Appendf("error closing storage backend: %w", err)
|
||||
}
|
||||
|
||||
if err := p.dbService.Stop(ctx); err != nil {
|
||||
errs.Appendf("error stopping database: %v", err)
|
||||
errs.Appendf("error stopping database: %w", err)
|
||||
}
|
||||
|
||||
p.state.Workers.Stop()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue