Added read status to obj

Signed-off-by: m.malygina <m.malygina@yadro.com>
This commit is contained in:
m.malygina 2024-06-05 16:59:22 +03:00
parent 645e53dd16
commit 8e807596d2

View file

@ -186,10 +186,12 @@ export function obj_read() {
} }
const resp = s3_client.get(obj.s3_bucket, obj.s3_key) const resp = s3_client.get(obj.s3_bucket, obj.s3_key)
if (!resp.success) { 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); .error(resp.error);
} else { } 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");
} }
return return