5
0
mirror of git://git.proxmox.com/git/pve-guest-common.git synced 2025-01-31 01:47:21 +03:00

PVE::ReplicationConfig add delete_job helper

Moved from PVE::Replication.
This commit is contained in:
Dietmar Maurer 2017-06-12 06:35:35 +02:00
parent c292c8e994
commit 571156eedc

View File

@ -209,6 +209,18 @@ sub check_for_existing_jobs {
return undef;
}
sub delete_job {
my ($jobid) = @_;
my $code = sub {
my $cfg = __PACKAGE__->new();
delete $cfg->{ids}->{$jobid};
$cfg->write();
};
lock($code);
}
package PVE::ReplicationConfig::Cluster;
use base qw(PVE::ReplicationConfig);