Added read status to obj

Signed-off-by: m.malygina <m.malygina@yadro.com>
add-delete-after-read
m.malygina 2024-06-05 20:52:18 +03:00
parent 1d6dc4c840
commit dedd478afb
1 changed files with 3 additions and 3 deletions

View File

@ -168,7 +168,7 @@ export function obj_write() {
if (obj_registry) {
obj_registry.addObject('', '', bucket, key, payload.hash());
log.withFields({bucket : bucket, key : key})
log.withFields({bucket : obj.s3_bucket, key : obj.s3_key, objid: obj.id, status: obj.status})
.info("write successfully");
}
}
@ -188,9 +188,9 @@ export function obj_read() {
log.withFields({bucket : obj.s3_bucket, key : obj.s3_key, status: obj.status, op: `READ`})
.error(resp.error);
} else {
log.withFields({bucket : obj.s3_bucket, key : obj.s3_key}).info("read successfully");
log.withFields({bucket : obj.s3_bucket, key : obj.s3_key, objid: obj.id, status: obj.status}).info("obj.info")
log.withFields({bucket : obj.s3_bucket, key : obj.s3_key, objid: obj.id, status: obj.status}).info("obj.info read successfully")
obj_registry.setObjectStatus(obj.id, obj.status, 'read');
log.withFields({bucket : obj.s3_bucket, key : obj.s3_key, objid: obj.id, status: obj.status}).info("obj.info read updated status successfully")
}
return