Added read status to obj

Signed-off-by: m.malygina <m.malygina@yadro.com>
add-delete-after-read
m.malygina 2024-06-05 16:16:51 +03:00
parent 7768ef57ee
commit 12711422ab
1 changed files with 6 additions and 0 deletions

View File

@ -168,6 +168,9 @@ export function obj_write() {
if (obj_registry) {
obj_registry.addObject('', '', bucket, key, payload.hash());
} else {
log.withFields({bucket : obj.s3_bucket, key : obj.s3_key})
.info("write successfully");
}
}
@ -196,6 +199,9 @@ export function obj_read() {
const resp = s3_client.get(obj.bucket, obj.object);
if (!resp.success) {
log.withFields({bucket : obj.bucket, key : obj.object}).error(resp.error);
} else {
log.withFields({bucket : obj.s3_bucket, key : obj.s3_key})
.info("read successfully");
}
}