From baf8c8dc0dd15bc89641a480a654839b296363af Mon Sep 17 00:00:00 2001 From: Thomas Lamprecht Date: Thu, 13 Jan 2022 13:09:44 +0100 Subject: [PATCH] small indentation and code cleanup Signed-off-by: Thomas Lamprecht --- src/PVE/APIServer/AnyEvent.pm | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/src/PVE/APIServer/AnyEvent.pm b/src/PVE/APIServer/AnyEvent.pm index b0b4866..9cabb3e 100644 --- a/src/PVE/APIServer/AnyEvent.pm +++ b/src/PVE/APIServer/AnyEvent.pm @@ -1253,10 +1253,11 @@ sub file_upload_multipart { } else { my $elapsed = tv_interval($rstate->{starttime}); - my $rate = int($rstate->{bytes}/($elapsed*1024*1024)); - syslog('info', "multipart upload complete " . - "(size: %d time: %ds rate: %.2fMiB/s md5sum: $rstate->{md5sum})", - $rstate->{bytes}, $elapsed, $rate); + my $rate = int($rstate->{bytes} / ($elapsed * 1024 * 1024)); + syslog('info', + "multipart upload complete (size: %d time: %ds rate: %.2fMiB/s md5sum: %s)", + $rstate->{bytes}, $elapsed, $rate, $rstate->{md5sum} + ); $self->handle_api2_request($reqstate, $auth, $method, $path, $rstate); } } @@ -1494,7 +1495,9 @@ sub unshift_read_header { outfh => $outfh, }; $reqstate->{tmpfilename} = $tmpfilename; - $reqstate->{hdl}->on_read(sub { $self->file_upload_multipart($reqstate, $auth, $method, $path, $state); }); + $reqstate->{hdl}->on_read(sub { + $self->file_upload_multipart($reqstate, $auth, $method, $path, $state); + }); return; }