From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from firstgate.proxmox.com (firstgate.proxmox.com [IPv6:2a01:7e0:0:424::9]) by lore.proxmox.com (Postfix) with ESMTPS id A8D931FF15E for ; Fri, 9 Aug 2024 10:19:51 +0200 (CEST) Received: from firstgate.proxmox.com (localhost [127.0.0.1]) by firstgate.proxmox.com (Proxmox) with ESMTP id 1C4D939CFD; Fri, 9 Aug 2024 10:20:01 +0200 (CEST) From: Lukas Wagner To: pbs-devel@lists.proxmox.com Date: Fri, 9 Aug 2024 10:19:50 +0200 Message-Id: <20240809081950.68107-1-l.wagner@proxmox.com> X-Mailer: git-send-email 2.39.2 MIME-Version: 1.0 X-SPAM-LEVEL: Spam detection results: 0 AWL 0.008 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 RCVD_IN_VALIDITY_CERTIFIED_BLOCKED 0.001 ADMINISTRATOR NOTICE: The query to Validity was blocked. See https://knowledge.validity.com/hc/en-us/articles/20961730681243 for more information. RCVD_IN_VALIDITY_RPBL_BLOCKED 0.001 ADMINISTRATOR NOTICE: The query to Validity was blocked. See https://knowledge.validity.com/hc/en-us/articles/20961730681243 for more information. RCVD_IN_VALIDITY_SAFE_BLOCKED 0.001 ADMINISTRATOR NOTICE: The query to Validity was blocked. See https://knowledge.validity.com/hc/en-us/articles/20961730681243 for more information. SPF_HELO_NONE 0.001 SPF: HELO does not publish an SPF Record SPF_PASS -0.001 SPF: sender matches SPF record URIBL_BLOCKED 0.001 ADMINISTRATOR NOTICE: The query to URIBL was blocked. See http://wiki.apache.org/spamassassin/DnsBlocklists#dnsbl-block for more information. [proxmox-daily-update.rs] Subject: [pbs-devel] [PATCH proxmox-backup] daily-update: initialize context for notification system X-BeenThere: pbs-devel@lists.proxmox.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: Proxmox Backup Server development discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: Proxmox Backup Server development discussion Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: pbs-devel-bounces@lists.proxmox.com Sender: "pbs-devel" Otherwise proxmox-daily-update panics if attempting to send a notification for any available new updates: "context for proxmox-notify has not been set yet" Signed-off-by: Lukas Wagner --- src/bin/proxmox-daily-update.rs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/bin/proxmox-daily-update.rs b/src/bin/proxmox-daily-update.rs index 66868dc7..dbfee07b 100644 --- a/src/bin/proxmox-daily-update.rs +++ b/src/bin/proxmox-daily-update.rs @@ -1,6 +1,7 @@ use anyhow::Error; use serde_json::json; +use proxmox_notify::context::pbs::PBS_CONTEXT; use proxmox_router::{cli::*, ApiHandler, RpcEnvironment}; use proxmox_subscription::SubscriptionStatus; use proxmox_sys::fs::CreateOptions; @@ -101,6 +102,8 @@ async fn run(rpcenv: &mut dyn RpcEnvironment) -> Result<(), Error> { proxmox_rest_server::register_task_control_commands(&mut command_sock)?; command_sock.spawn(proxmox_rest_server::last_worker_future())?; + proxmox_notify::context::set_context(&PBS_CONTEXT); + do_update(rpcenv).await } -- 2.39.2 _______________________________________________ pbs-devel mailing list pbs-devel@lists.proxmox.com https://lists.proxmox.com/cgi-bin/mailman/listinfo/pbs-devel