From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from firstgate.proxmox.com (firstgate.proxmox.com [212.224.123.68]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by lists.proxmox.com (Postfix) with ESMTPS id 5DC9791477 for ; Mon, 29 Jan 2024 10:38:33 +0100 (CET) Received: from firstgate.proxmox.com (localhost [127.0.0.1]) by firstgate.proxmox.com (Proxmox) with ESMTP id 3A5F313595 for ; Mon, 29 Jan 2024 10:38:33 +0100 (CET) Received: from proxmox-new.maurer-it.com (proxmox-new.maurer-it.com [94.136.29.106]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by firstgate.proxmox.com (Proxmox) with ESMTPS for ; Mon, 29 Jan 2024 10:38:32 +0100 (CET) Received: from proxmox-new.maurer-it.com (localhost.localdomain [127.0.0.1]) by proxmox-new.maurer-it.com (Proxmox) with ESMTP id 739E843FB0 for ; Mon, 29 Jan 2024 10:38:31 +0100 (CET) Message-ID: Date: Mon, 29 Jan 2024 10:38:27 +0100 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird To: Proxmox VE development discussion , Lukas Wagner References: <20231214141154.279100-1-l.wagner@proxmox.com> Content-Language: en-US From: Fiona Ebner In-Reply-To: <20231214141154.279100-1-l.wagner@proxmox.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-SPAM-LEVEL: Spam detection results: 0 AWL -0.074 Adjusted score from AWL reputation of From: address BAYES_00 -1.9 Bayes spam probability is 0 to 1% DMARC_MISSING 0.1 Missing DMARC policy KAM_DMARC_STATUS 0.01 Test Rule for DKIM or SPF Failure with Strict Alignment SPF_HELO_NONE 0.001 SPF: HELO does not publish an SPF Record SPF_PASS -0.001 SPF: sender matches SPF record T_SCC_BODY_TEXT_LINE -0.01 - URIBL_BLOCKED 0.001 ADMINISTRATOR NOTICE: The query to URIBL was blocked. See http://wiki.apache.org/spamassassin/DnsBlocklists#dnsbl-block for more information. [vzdump.pm] Subject: [pve-devel] applied-series: [PATCH manager 1/2] fix #5067: vzdump: include total backup size in notification X-BeenThere: pve-devel@lists.proxmox.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: Proxmox VE development discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 29 Jan 2024 09:38:33 -0000 Am 14.12.23 um 15:11 schrieb Lukas Wagner: > The old backup job notification mails from before the notification > system overhaul included the total time as well as the total size. > > The total size was missing from the new, template-based backup report, > thus we add it back in this commit. > > Signed-off-by: Lukas Wagner > --- applied series, thanks! > PVE/VZDump.pm | 24 ++++++++++++++---------- > 1 file changed, 14 insertions(+), 10 deletions(-) > > diff --git a/PVE/VZDump.pm b/PVE/VZDump.pm > index 4185ed62..91f60418 100644 > --- a/PVE/VZDump.pm > +++ b/PVE/VZDump.pm > @@ -414,15 +414,17 @@ sub sanitize_task_list { > } > } > > -sub count_failed_tasks { > +my sub aggregate_task_statistics { > my ($tasklist) = @_; > > my $error_count = 0; > + my $total_size = 0; > for my $task (@$tasklist) { > $error_count++ if $task->{state} ne 'ok'; > + $total_size += $task->{size} if $task->{state} eq 'ok'; > } > > - return $error_count; > + return $error_count, $total_size; > } With a small style fix to use parentheses for the list return here.