Skip to content

Commit

Permalink
[finalize] abort if file is already ready
Browse files Browse the repository at this point in the history
  • Loading branch information
MalinAhlberg committed Oct 15, 2024
1 parent 9af7ecd commit 31369f7
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions sda/cmd/finalize/finalize.go
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,11 @@ func main() {
case "enabled":
case "ready":
log.Infof("File with correlation ID %s is already marked as ready.", delivered.CorrelationId)
if err := delivered.Ack(false); err != nil {
log.Errorf("Failed acking message, reason: %v", err)
}

continue
default:
log.Warnf("file with correlation ID: %s is not verified yet, stopping work", delivered.CorrelationId)
if err := delivered.Nack(false, true); err != nil {
Expand Down

0 comments on commit 31369f7

Please sign in to comment.