app/imageoper, app/maindb: one image - one arch; app/storage: blob to name subdir
This commit is contained in:
@@ -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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user