]> git.proxmox.com Git - pve-ha-manager.git/blobdiff - src/PVE/HA/Env/PVE2.pm
env: switch to matcher-based notification system
[pve-ha-manager.git] / src / PVE / HA / Env / PVE2.pm
index ea9e6e426f2cb4cb1a3e6ee083c0bf7216ed4e37..fcb60a91a7be7d3404602484fc9a18f5fa5af8fb 100644 (file)
@@ -221,16 +221,10 @@ sub log {
 }
 
 sub send_notification {
-    my ($self, $subject, $text, $properties) = @_;
+    my ($self, $subject, $text, $template_data, $metadata_fields) = @_;
 
     eval {
-       my $dc_config = PVE::Cluster::cfs_read_file('datacenter.cfg');
-       my $target = $dc_config->{notify}->{'target-fencing'} // PVE::Notify::default_target();
-       my $notify = $dc_config->{notify}->{fencing} // 'always';
-
-       if ($notify eq 'always') {
-           PVE::Notify::error($target, $subject, $text, $properties);
-       }
+       PVE::Notify::error($subject, $text, $template_data, $metadata_fields);
     };
 
     $self->log("warning", "could not notify: $@") if $@;