app/imageoper, app/maindb: one image - one arch; app/storage: blob to name subdir

This commit is contained in:
2026-03-17 09:40:53 +02:00
parent 13b1905e05
commit 791e04cdf1
28 changed files with 680 additions and 569 deletions
+2 -2
View File
@@ -59,13 +59,13 @@ func (oper *Operator) DeleteBlob(ctx context.Context, operatorID string, params
return res, http.StatusInternalServerError, err
}
// Removing the blob binary if usage == 0
blobUsage, err := oper.mdb.GetBlobUsage(ctx, params.Digest)
blobUsage, err := oper.mdb.GetBlobUsage(ctx, params.Name, params.Digest)
if err != nil {
return res, http.StatusInternalServerError, err
}
if blobUsage == 0 {
oper.logg.Warningf("Deleting useless blob binary %s", params.Digest)
oper.store.DeleteBlob(params.Digest)
oper.store.DeleteBlob(params.Name, params.Digest)
}
return res, http.StatusOK, err
}