From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from firstgate.proxmox.com (firstgate.proxmox.com [212.224.123.68]) by lore.proxmox.com (Postfix) with ESMTPS id 677B41FF136 for ; Mon, 23 Mar 2026 13:26:44 +0100 (CET) Received: from firstgate.proxmox.com (localhost [127.0.0.1]) by firstgate.proxmox.com (Proxmox) with ESMTP id 266C115DA3; Mon, 23 Mar 2026 13:26:50 +0100 (CET) Content-Type: text/plain; charset=UTF-8 Date: Mon, 23 Mar 2026 13:26:34 +0100 Message-Id: Subject: Re: [PATCH pve-cluster 1/1] notifications: Add refresh_targets subroutine to PVE::Notify From: "Lukas Wagner" To: "Arthur Bied-Charreton" , Mime-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Mailer: aerc 0.21.0-0-g5549850facc2-dirty References: <20260213160415.609868-1-a.bied-charreton@proxmox.com> <20260213160415.609868-17-a.bied-charreton@proxmox.com> In-Reply-To: <20260213160415.609868-17-a.bied-charreton@proxmox.com> X-Bm-Milter-Handled: 55990f41-d878-4baa-be0a-ee34c49e34d2 X-Bm-Transport-Timestamp: 1774268748843 X-SPAM-LEVEL: Spam detection results: 0 AWL 0.049 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 Message-ID-Hash: QCXYFDAAE5WBMTZRNTLG7FB6JEVDRSDC X-Message-ID-Hash: QCXYFDAAE5WBMTZRNTLG7FB6JEVDRSDC X-MailFrom: l.wagner@proxmox.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; loop; banned-address; emergency; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header X-Mailman-Version: 3.3.10 Precedence: list List-Id: Proxmox VE development discussion List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: On Fri Feb 13, 2026 at 5:04 PM CET, Arthur Bied-Charreton wrote: > Expose API to allow refreshing all notification targets' state from the > PVE backend, as well as from pveupdate. > > Signed-off-by: Arthur Bied-Charreton > --- > src/PVE/Notify.pm | 6 ++++++ > 1 file changed, 6 insertions(+) > > diff --git a/src/PVE/Notify.pm b/src/PVE/Notify.pm > index b44b5b3..ebb2311 100644 > --- a/src/PVE/Notify.pm > +++ b/src/PVE/Notify.pm > @@ -103,6 +103,12 @@ sub error { > ); > } > =20 > +sub trigger_state_refresh { > + my ($config) =3D @_; > + $config =3D read_config() if !defined($config); > + $config->trigger_state_refresh(); > +} > + maybe I'm missing something, but it does not seem like you actually need/use this function? As far as I could tell you always call into the perlmod-bidings directly in the API handler as well as `pveupdate` and do not call this wrapper here? Calling this helper here would be a=20 PVE::Notify::trigger_state_refresh(); but you always do a=20 my $config =3D PVE::Notify::read_config(); $config->trigger_state_refresh(); I think both variants would be OK, but you should either remove this patch here or actually use it at the call sites :)