add logs to delete

Signed-off-by: m.malygina <m.malygina@yadro.com>
m.malygina 2024-06-20 11:03:24 +03:00
parent e3d0cd9af7
commit 191d23e004
2 changed files with 3 additions and 2 deletions

View File

@ -108,7 +108,7 @@ func (c *Client) Multipart(bucket, key string, objPartSize, concurrency int, pay
func (c *Client) Delete(bucket, key string) DeleteResponse {
start := time.Now()
println("Delete bucket:", bucket, " key:", key)
_, err := c.cli.DeleteObject(c.vu.Context(), &s3.DeleteObjectInput{
Bucket: aws.String(bucket),
Key: aws.String(key),

View File

@ -182,6 +182,7 @@ export function obj_read() {
if (!obj ) {
return;
}
log.withFields({bucket : obj.s3_bucket, key : obj.s3_key, op : 'READ START'}).info("INFO");
const resp = s3_client.get(obj.s3_bucket, obj.s3_key)
if (!resp.success) {
log.withFields({bucket : obj.s3_bucket, key : obj.s3_key, status: obj.status, op: `READ`})
@ -189,7 +190,7 @@ export function obj_read() {
} else {
obj_registry.setObjectStatus(obj.id, obj.status, 'read');
}
log.withFields({bucket : obj.s3_bucket, key : obj.s3_key, op : 'READ FINISHED'}).info("INFO");
return
}