From: Thomas Lamprecht Date: Wed, 18 Nov 2020 15:48:59 +0000 (+0100) Subject: api: pbs: try to delete schedule on remote deletion X-Git-Url: https://git.proxmox.com/?a=commitdiff_plain;h=ee6dcfe9a984498e2db8fcdadeb91a50fac2020e;p=pmg-api.git api: pbs: try to delete schedule on remote deletion Signed-off-by: Thomas Lamprecht --- diff --git a/src/PMG/API2/PBS/Remote.pm b/src/PMG/API2/PBS/Remote.pm index 2eba9bb..094ba2f 100644 --- a/src/PMG/API2/PBS/Remote.pm +++ b/src/PMG/API2/PBS/Remote.pm @@ -200,7 +200,6 @@ __PACKAGE__->register_method ({ my ($param) = @_; my $code = sub { - my $conf = PMG::PBSConfig->new(); my $ids = $conf->{ids}; @@ -212,6 +211,8 @@ __PACKAGE__->register_method ({ delete $ids->{$remote}; $conf->write(); + + eval { PMG::PBSSchedule::delete_schedule($remote) }; # best effort only }; PMG::PBSConfig::lock_config($code, "delete PBS remote failed");