[server] Remove entry from object_keys before marking del as completed (#677)
## Description ## Tests
This commit is contained in:
parent
ef553d9401
commit
3513d7a297
1 changed files with 5 additions and 5 deletions
|
@ -652,16 +652,16 @@ func (c *FileController) cleanupDeletedFile(qItem repo.QueueItem) {
|
|||
return
|
||||
}
|
||||
}
|
||||
err = c.QueueRepo.DeleteItem(repo.DeleteObjectQueue, qItem.Item)
|
||||
if err != nil {
|
||||
ctxLogger.WithError(err).Error("Failed to remove item from the queue")
|
||||
return
|
||||
}
|
||||
err = c.ObjectRepo.RemoveObjectsForKey(qItem.Item)
|
||||
if err != nil {
|
||||
ctxLogger.WithError(err).Error("Failed to remove item from object_keys")
|
||||
return
|
||||
}
|
||||
err = c.QueueRepo.DeleteItem(repo.DeleteObjectQueue, qItem.Item)
|
||||
if err != nil {
|
||||
ctxLogger.WithError(err).Error("Failed to remove item from the queue")
|
||||
return
|
||||
}
|
||||
ctxLogger.Info("Successfully deleted item")
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue