Repeat
*/
-var DEFAULT_TRASH_LIFE_TIME int64 = 1209600 // Use 2 weeks for now
-
func RunTrashWorker(trashq *WorkQueue) {
nextItem := trashq.NextItem
for item := range nextItem {
if err == nil {
if trashRequest.BlockMtime == mtime.Unix() {
currentTime := time.Now().Unix()
- if (currentTime - trashRequest.BlockMtime) > DEFAULT_TRASH_LIFE_TIME {
+ if time.Duration(currentTime-trashRequest.BlockMtime)*time.Second >= permission_ttl {
err = volume.Delete(trashRequest.Locator)
}
}