forked from TrueCloudLab/xk6-frostfs
Added read status to obj
Signed-off-by: m.malygina <m.malygina@yadro.com>
This commit is contained in:
parent
12711422ab
commit
645e53dd16
1 changed files with 3 additions and 2 deletions
|
@ -181,15 +181,16 @@ export function obj_read() {
|
|||
|
||||
if (obj_to_read_selector) {
|
||||
const obj = obj_to_read_selector.nextObject();
|
||||
if (!obj) {
|
||||
if (!obj || (obj.status == "read") ) {
|
||||
return;
|
||||
}
|
||||
const resp = s3_client.get(obj.s3_bucket, obj.s3_key)
|
||||
if (!resp.success) {
|
||||
log.withFields({bucket : obj.s3_bucket, key : obj.s3_key})
|
||||
.error(resp.error);
|
||||
} else {
|
||||
obj_registry.setObjectStatus(obj.id, obj.status, "read");
|
||||
}
|
||||
obj_registry.setObjectStatus(obj.id, obj.status, "read");
|
||||
|
||||
return
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue