Added read status to obj

Signed-off-by: m.malygina <m.malygina@yadro.com>
This commit is contained in:
m.malygina 2024-06-05 17:29:27 +03:00
parent 034e319809
commit 0477552ee5
2 changed files with 2 additions and 2 deletions

View file

@ -83,7 +83,7 @@ func (o *ObjRegistry) SetObjectStatus(id uint64, oldStatus, newStatus string) er
key := encodeId(id)
objBytes := oldB.Get(key)
if objBytes == nil {
return fmt.Errorf("object %w doesn't exist", key)
return fmt.Errorf("object %s doesn't exist", key)
}
if err := oldB.Delete(key); err != nil {
return fmt.Errorf("bucket.Delete: %w", err)

View file

@ -188,7 +188,7 @@ export function obj_read() {
log.withFields({bucket : obj.s3_bucket, key : obj.s3_key, status: obj.status, op: `READ`})
.error(resp.error);
} else {
obj_registry.setObjectStatus(obj.id, obj.status, "read");
//obj_registry.setObjectStatus(obj.id, obj.status, "read");
log.withFields({bucket : obj.s3_bucket, key : obj.s3_key})
.info("read successfully");
}