Added read status to obj

Signed-off-by: m.malygina <m.malygina@yadro.com>
add-delete-after-read
m.malygina 2024-06-05 16:59:22 +03:00
parent 645e53dd16
commit 8e807596d2
1 changed files with 3 additions and 1 deletions

View File

@ -186,10 +186,12 @@ export function obj_read() {
}
const resp = s3_client.get(obj.s3_bucket, obj.s3_key)
if (!resp.success) {
log.withFields({bucket : obj.s3_bucket, key : obj.s3_key})
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");
log.withFields({bucket : obj.s3_bucket, key : obj.s3_key})
.info("read successfully");
}
return