mirror of
https://github.com/TecharoHQ/anubis.git
synced 2025-08-03 09:48:08 -04:00
fix(lib/store/bbolt): gracefully handle the obsolete anubis bucket in cleanup
Signed-off-by: Xe Iaso <me@xeiaso.net>
This commit is contained in:
parent
0c49d2ff5b
commit
729c52ab7a
@ -132,7 +132,8 @@ func (s *Store) cleanup(ctx context.Context) error {
|
||||
|
||||
expiryStr := valueBkt.Get([]byte("expiry"))
|
||||
if expiryStr == nil {
|
||||
return fmt.Errorf("[unexpected] %w: %q (expiry is nil)", store.ErrNotFound, string(key))
|
||||
slog.Warn("while running cleanup, expiry is not set somehow, file a bug?", "key", string(key))
|
||||
return nil
|
||||
}
|
||||
|
||||
expiry, err = time.Parse(time.RFC3339Nano, string(expiryStr))
|
||||
|
Loading…
x
Reference in New Issue
Block a user