X-Git-Url: https://git.arvados.org/arvados.git/blobdiff_plain/6bf9e1a4b5640f3cdd057810f0c9b8a945bb88bd..af8d161b1c3466d2d6fdfb3b1ce94ca73d8fea86:/services/keepstore/keepstore.go?ds=sidebyside diff --git a/services/keepstore/keepstore.go b/services/keepstore/keepstore.go index 3c9d5d15e8..953aa047cb 100644 --- a/services/keepstore/keepstore.go +++ b/services/keepstore/keepstore.go @@ -2,7 +2,7 @@ // // SPDX-License-Identifier: AGPL-3.0 -package main +package keepstore import ( "time" @@ -17,8 +17,6 @@ const MinFreeKilobytes = BlockSize / 1024 var bufs *bufferPool -// KeepError types. -// type KeepError struct { HTTPCode int ErrMsg string @@ -51,7 +49,9 @@ func (e *KeepError) Error() string { func emptyTrash(mounts []*VolumeMount, interval time.Duration) { for range time.NewTicker(interval).C { for _, v := range mounts { - v.EmptyTrash() + if v.KeepMount.AllowTrash { + v.EmptyTrash() + } } } }