all lists on lists.proxmox.com
 help / color / mirror / Atom feed
From: "Fabian Grünbichler" <f.gruenbichler@proxmox.com>
To: Proxmox Backup Server development discussion
	<pbs-devel@lists.proxmox.com>
Subject: [pbs-devel] applied: [PATCH proxmox-backup] daily-update: initialize context for notification system
Date: Fri, 09 Aug 2024 10:55:43 +0200	[thread overview]
Message-ID: <1723193730.pyqv46yldm.astroid@yuna.none> (raw)
In-Reply-To: <20240809081950.68107-1-l.wagner@proxmox.com>

with forum link folded in, thanks!

On August 9, 2024 10:19 am, Lukas Wagner wrote:
> 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 <l.wagner@proxmox.com>
> ---
>  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
> 
> 
> 


_______________________________________________
pbs-devel mailing list
pbs-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pbs-devel


      parent reply	other threads:[~2024-08-09  8:55 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-08-09  8:19 [pbs-devel] " Lukas Wagner
2024-08-09  8:24 ` Lukas Wagner
2024-08-09  8:55 ` Fabian Grünbichler [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1723193730.pyqv46yldm.astroid@yuna.none \
    --to=f.gruenbichler@proxmox.com \
    --cc=pbs-devel@lists.proxmox.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal