Skip to content

Commit

Permalink
add storage enable/disable log
Browse files Browse the repository at this point in the history
  • Loading branch information
zyxkad committed Mar 22, 2024
1 parent 6e15dd2 commit 5b0b83a
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
2 changes: 2 additions & 0 deletions storage/storage_mount.go
Original file line number Diff line number Diff line change
Expand Up @@ -181,6 +181,7 @@ func (s *MountStorage) preServe(ctx context.Context) bool {
s.working.Store(0)
return false
}
log.Warnf("Re-enabled storage %s", s.String())
s.supportRange.Store(supportRange)
s.working.Store(1)
} else {
Expand All @@ -203,6 +204,7 @@ func (s *MountStorage) preServe(ctx context.Context) bool {
s.supportRange.Store(supportRange)
s.working.Store(1)
} else {
log.Errorf("Disabled storage %s: %v", s.String(), err)
s.working.Store(0)
}
}()
Expand Down
2 changes: 2 additions & 0 deletions storage/storage_webdav.go
Original file line number Diff line number Diff line change
Expand Up @@ -325,6 +325,7 @@ func (s *WebDavStorage) preServe(ctx context.Context) bool {
s.working.Store(0)
return false
}
log.Warnf("Re-enabled storage %s", s.String())
s.working.Store(1)
} else {
s.checkMux.RLock()
Expand All @@ -345,6 +346,7 @@ func (s *WebDavStorage) preServe(ctx context.Context) bool {
if err := s.checkAlive(tctx, 0); err == nil {
s.working.Store(1)
} else {
log.Errorf("Disabled storage %s: %v", s.String(), err)
s.working.Store(0)
}
}()
Expand Down

0 comments on commit 5b0b83a

Please sign in to comment.