From: Lukas Wagner <l.wagner@proxmox.com>
To: Proxmox Backup Server development discussion
<pbs-devel@lists.proxmox.com>,
Gabriel Goller <g.goller@proxmox.com>
Subject: Re: [pbs-devel] [PATCH proxmox-backup] notifications: fix legacy sync notifications
Date: Tue, 21 May 2024 12:43:30 +0200 [thread overview]
Message-ID: <8f816249-d188-4861-b61d-8988ee2b8d1a@proxmox.com> (raw)
In-Reply-To: <20240515095850.90718-1-g.goller@proxmox.com>
Did not test this, but code-wise this looks good.
Likely a copy-paste mistake which slipped through code review.
Reviewed-by: Lukas Wagner <l.wagner@proxmox.com>
On 2024-05-15 11:58, Gabriel Goller wrote:
> When using the legacy notifications the sync mode would pick up the
> settings from the prune-job, which default to Error. This completely
> disables notifications for successful sync-jobs when using the legacy
> system.
>
> Motivation: https://forum.proxmox.com/threads/legacy-notification-does-not-send-some-emails.147018/
>
> Signed-off-by: Gabriel Goller <g.goller@proxmox.com>
> ---
> src/server/notifications.rs | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/src/server/notifications.rs b/src/server/notifications.rs
> index d142971b..eea55202 100644
> --- a/src/server/notifications.rs
> +++ b/src/server/notifications.rs
> @@ -332,7 +332,7 @@ pub fn send_sync_status(job: &SyncJobConfig, result: &Result<(), Error>) -> Resu
> let (email, notify, mode) = lookup_datastore_notify_settings(&job.store);
> match mode {
> NotificationMode::LegacySendmail => {
> - let notify = notify.prune.unwrap_or(Notify::Error);
> + let notify = notify.sync.unwrap_or(Notify::Always);
>
> if notify == Notify::Never || (result.is_ok() && notify == Notify::Error) {
> return Ok(());
--
- Lukas
_______________________________________________
pbs-devel mailing list
pbs-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pbs-devel
next prev parent reply other threads:[~2024-05-21 10:43 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-05-15 9:58 Gabriel Goller
2024-05-21 10:01 ` Max Carrara
2024-05-21 10:43 ` Lukas Wagner [this message]
2024-05-22 15:33 ` [pbs-devel] applied: " Thomas Lamprecht
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=8f816249-d188-4861-b61d-8988ee2b8d1a@proxmox.com \
--to=l.wagner@proxmox.com \
--cc=g.goller@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox